Get Tool Definition • AI Agent SDK
get_tool_definition: Get the effective OpenAI-compatible definition for one registered name.
get_tool_definition
Method
</div>
This is a method of the ToolRegistry class in the registry module.
Get the effective OpenAI-compatible definition for one registered name.
Unlike :meth:get, which returns the raw tool object, this applies any dynamic `schema_override (via ToolEntry.schema) and forces the advertised function.name to the registry key, so a callable registered under an alias is offered — and later resolved — under that alias rather than its underlying __name__`.
Returns `None` if the name is unknown or unavailable.
Signature
def get_tool_definition(name: str) -> Optional[Dict[str, Any]]Parameters
ParamField
strNo description available.
Returns
ResponseField
Optional[Dict[str, Any]]The result of the operation.
Uses
discover_pluginslogging.error
Source
View on GitHubpraisonaiagents/tools/registry.py at line 314