Tool Registry
How It Works
Direct Usage
from djangosdk.tools.registry import ToolRegistry
from myapp.tools import lookup_order, cancel_order
registry = ToolRegistry()
registry.register(lookup_order)
registry.register(cancel_order)
# Get all tool schemas (sent to the model)
schemas = registry.get_schemas()
# Execute a tool by name
result = registry.execute("lookup_order", {"order_id": "ABC123"})
# Async execution
result = await registry.aexecute("lookup_order", {"order_id": "ABC123"})Registering BaseTool Instances
Tool Execution Error Handling
Last updated
Was this helpful?