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.

Diagram

uses

returns

Agent

Tool: get_tool_definition

Result

Signature

python
def get_tool_definition(name: str) -> Optional[Dict[str, Any]]

Parameters

ParamField str

No description available.

Returns

ResponseField Optional[Dict[str, Any]]

The result of the operation.

Uses

  • discover_plugins
  • logging.error

Source

View on GitHub

praisonaiagents/tools/registry.py at line 314


Related Documentation