Overview
The Tools API allows plugins to invoke other tools (built-in or custom), enabling tool composition and chaining. Requires permission:tool_invocation
Basic Usage
invoke()
Invoke a tool:Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
tool_name | str | No* | Tool name (for built-in tools) |
tool_uuid | str | No* | Tool UUID (for custom tools) |
parameters | dict | No | Tool parameters |
tool_name or tool_uuid must be provided
Return Value
Returns the tool’s output (typically adict):
Examples
Invoke Built-in Tool
Invoke Custom Tool
Tool Chaining
Parallel Tool Execution
Conditional Tool Invocation
Error Handling
Retry Failed Tool Calls
Best Practices
Check Tool Availability
Check Tool Availability
Verify tools exist before invoking, handle tool not found errors
Handle Failures Gracefully
Handle Failures Gracefully
Always check
success in results, don’t assume tools succeedLog Tool Chains
Log Tool Chains
Use context logging to track tool execution chains for debugging
Validate Parameters
Validate Parameters
Ensure parameters match what the target tool expects
Use Retries for Network Tools
Use Retries for Network Tools
Apply
@retry for tools that make external calls