Skip to main content

register

Method
This is a method of the ToolRegistry class in the registry module.
Register a tool with the registry. Thread-safe: Uses lock for concurrent access in multi-agent scenarios.

Signature

Parameters

Union[BaseTool, Callable]
required
BaseTool instance or callable function
Optional[str]
Override name (default: tool.name or function.name)
bool
default:"False"
If True, overwrite existing tool with same name
Optional[str]
Trust level for the tool (“trusted” or “external”)
Optional
Optional function to dynamically modify tool schema. Called with base schema dict, returns modified schema dict.

Exceptions

If tool with same name exists and overwrite=False

Uses

  • ToolTrustLevel
  • ValueError
  • callable
  • TypeError
  • logging.debug
  • ToolEntry

Used By

Source

View on GitHub

praisonaiagents/tools/registry.py at line 116