Class: Tools
Methods
list()
List all available tools from configured MCP servers. Returns:list[ToolDefinition]
Example:
call()
Call a tool by name with arguments. Parameters:
Returns:
dict - Tool output parsed from JSON
Raises: ToolCallError on tool execution failure
Example:
ToolDefinition
Configuration
MCP servers are configured in the@agent decorator:
Error Handling
Finding Tools
Filter by name pattern:Dynamic Tool Selection
Real Example: Time Operations
Multiple MCP Servers
Tools from all configured servers are merged into a single namespace:Tool Chaining
Schema Inspection
Common MCP Servers
Transport Types
Currently supported:stdio
Planned: sse (Server-Sent Events)
Environment Variables
Pass environment variables directly to MCP server processes:ctx.env, use the environment decorator field:
See Also
How to Use MCP Tools
Task-oriented guide
MCP Specification
Official protocol documentation
MCP Servers Registry
Community server directory

