Interfaces for registering, configuring, and resolving tools — the surface you use when authoring a custom tool.
See also: Custom tools for the practical guide.
src.tools.configure
Tool configuration model — what each tool declaration looks like in code.
Key types:
ToolConfig— declarative config:name,description,safety_category,requires_confirmation,enabled_by_default.@register_tool— decorator that pairs a function with itsToolConfig.
src.tools.resolver
Resolves tool names to callable instances. Handles aliases, MCP-server prefixes, and disabled-tool filtering.
Key callables:
resolve_tool(name)— returns the registeredStructuredToolor raises.resolve_tools(names)— batch version.
src.registry
The lower-level dynamic loader. Walks src/tools/ at startup and imports each module that opts in via a top-level TOOL_CONFIGS list.
Key callable:
load_tools_from_directory(path)— scans for tool modules and registers each declared tool.