ai_tool_select
AI tool router (pick the right tool + arguments) — Agent tool routing: give a user request and your tool list, get back the single best tool, filled-in arguments, confidence, missing required parameters, a clarifying question when needed, alternatives, and an offline keyword ranking (BM25-style) as a cross-check. tools= accepts 'name: description; name2: description2' or a JSON array of {name,description} or OpenAI tool objects (parameters.required is checked). Up to 40 tools. Unknown tool names from the model are rejected and fall back to the keyword match. Workers AI. Price: $0.006 USDC (Base, via x402).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"query": "<query>",
"tools": "<tools>"
},
"name": "ai_tool_select"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | e.g. what will the weather be in Denver tomorrow | |
| tools | Yes | e.g. get_weather: forecast for a city; search_flights: find flights between two airports; get_stock: latest stock price |