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
ValueError
ValueError
If tool with same name exists and overwrite=False
Uses
ToolTrustLevelValueErrorcallableTypeErrorlogging.debugToolEntry
Used By
HookRegistry.register_functionHookRegistry.register_commandregister_middlewareregister_runtimetool
Source
View on GitHub
praisonaiagents/tools/registry.py at line 116
