Tool
TheTool class lets you register custom tools with agents, configure approval gates, and execute tools directly.
Registering tools
From a function (recommended)
Pass a Python function directly — the SDK extracts the name, docstring, and parameter types automatically:With explicit parameters
Retrieving tools
Approval gates
Direct execution
Execute a tool outside of an agent conversation (dry-run / sandbox mode):Deleting tools
Properties
| Property | Type | Description | |
|---|---|---|---|
id | str | Tool UUID | |
name | str | Tool name | |
agent_id | str | ID of the agent this tool belongs to | |
description | `str | None` | Tool description |
function_code | `str | None` | Python source code |
config | ToolConfig | Full configuration dataclass |

