Tools & MCP
Tools, the Global Tool Registry, MCP server seeding, and the ClosureTool pattern for building AI agents with real-world capabilities.
Basic Tool Usage
// Inline lambda tool
weatherTool = aiTool(
"get_weather",
"Get current weather for a location",
location => getWeatherData( location )
).describeLocation( "City and country, e.g. Boston, MA" )
agent = aiAgent(
name : "WeatherBot",
tools: [ weatherTool ]
)
response = agent.run( "What's the weather in Paris?" )
// Agent automatically calls get_weather("Paris")Global Tool Registry (v3.0+)
Registering with Shorthand
@AITool Annotation Scanning
@AITool Annotation ScanningRegistry API
Method
Description
ClosureTool Pattern
Accessing _chatRequest in Tools
_chatRequest in ToolsMCP Server Seeding (v3.0+)
MCP Authentication
Dynamic Tool Assignment
Related Pages
Last updated