{"openapi":"3.1.0","info":{"title":"ToolRoute","version":"0.1.0","contact":{"name":"ToolRoute","email":"hello@youraitools.co","url":"https://api.youraitools.co/toolroute/"},"license":{"name":"MIT"},"x-service-name":"ToolRoute by YourAITools","x-category":"developer-tools","x-categories":["developer-tools","mcp","agent-infrastructure","search","x402"],"x-tags":["mcp","agent-tools","tool-selection","routing","token-cost"],"x-logo":{"url":"https://youraitools.co/favicon-192.png"},"description":"ToolRoute picks the few tools an agent needs for a task out of a large tool list, so the model sees 3-12 definitions instead of hundreds. Register a tool set once (free; tools array or public remote MCP URL), then send set_id + the task: you get a ranked shortlist with confidence, matched terms and token savings, and the definitions ready to inject in OpenAI, Anthropic, Gemini or MCP form. Deterministic BM25 keyword ranking, no LLM, no embeddings. Pay per call over x402 or with prepaid credits; 200 free routes per day on the remote MCP endpoint. Keyword ranking (BM25), no LLM: it matches words, synonyms and stems, not meaning. Check low-confidence results; the shortlist widens automatically when the match is weak.","x-guidance":"GET /v1/route?set_id=ts_0d467a406d3eb14344c41c32d8802268&query=read+a+web+page+as+markdown ($0.001). POST the same fields as JSON. USDC via x402 (Base, Polygon, Arbitrum One), charged only on HTTP 200. Free: remote MCP at https://api.youraitools.co/toolroute/mcp (daily free calls per IP)."},"servers":[{"url":"https://api.youraitools.co/toolroute"}],"externalDocs":{"description":"Source and docs","url":"https://api.youraitools.co/toolroute/"},"paths":{"/v1/route":{"get":{"operationId":"toolroute_route","summary":"Route a task to the few tools it needs out of a registered tool set (BM25 shortlist, definitions ready to inject) ($0.001)","description":"Pick the tools an agent needs for a task from a large tool list: send set_id (from the free /v1/register) or tools, plus the task. Returns a ranked shortlist (adaptive 3-12, or k), confidence, matched terms, token savings and the definitions in MCP, OpenAI, Anthropic or Gemini form. BM25, no LLM. Unknown set_id: 404, never charged.","tags":["paid"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.001"},"protocols":[{"x402":{}}]},"x-x402":{"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F","amount":"1000","assetSymbol":"USDC","x402Versions":[2,1],"networks":[{"network":"eip155:8453","name":"Base","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","symbol":"USDC","payTo":"0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F"},{"network":"eip155:137","name":"Polygon","asset":"0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359","symbol":"USDC","payTo":"0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F"},{"network":"eip155:42161","name":"Arbitrum One","asset":"0xaf88d065e77c8cC2239327C5EDb3A432268e5831","symbol":"USDC","payTo":"0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F"}]},"parameters":[{"name":"set_id","in":"query","required":false,"schema":{"type":"string"},"description":"set_id (\"ts_...\" from register, or a ToolFit pin)."},{"name":"tools","in":"query","required":false,"schema":{"type":"array"},"description":"Tool definitions (MCP, OpenAI, Anthropic, Gemini or Bedrock form), max 500. For route: only if you have no set_id (the set is registered on the fly)."},{"name":"query","in":"query","required":true,"schema":{"type":"string"},"description":"The task or user request to route, e.g. \"check if this wallet is sanctioned\"."},{"name":"k","in":"query","required":false,"schema":{"type":"integer"},"description":"Fixed shortlist size (default adaptive)"},{"name":"max_k","in":"query","required":false,"schema":{"type":"integer"},"description":"Upper bound for the adaptive size (default 12)"},{"name":"format","in":"query","required":false,"schema":{"type":"string","enum":["mcp","openai","anthropic","gemini","names"]},"description":"Definition format (default mcp; names = names only)"}],"responses":{"200":{"description":"shortlist with scores and matched terms, confidence, widened flag, token savings, definitions in the chosen format; drift (with a warning) when the set was registered from a URL that now lists a different tool set. (payment settled)","content":{"application/json":{"example":{"set_id":"ts_0d467a406d3eb14344c41c32d8802268","query":"read a web page as markdown","confidence":"high","widened":false,"shortlist":[{"name":"read_url","score":14.23,"matched":["read","web","page","markdown"]},{"name":"scan_url","score":8.09,"matched":["read","web","page"]},{"name":"detect_stack","score":7.05,"matched":["web","page"]}],"tokens":{"all":11585,"shortlist":1278,"saved_pct":89}}}}},"400":{"description":"Invalid input (never charged)"},"402":{"description":"Payment Required (x402 v2 terms in the PAYMENT-REQUIRED header, v1 terms in the body)"},"404":{"description":"Unknown pin (never charged)"},"413":{"description":"Body too large (never charged)"},"422":{"description":"Remote MCP server could not be listed (never charged)"},"503":{"description":"Timeout or pin store unavailable (never charged)"}}},"post":{"operationId":"toolroute_route_post","summary":"Same as GET, POST {\"set_id\":\"ts_0d467a406d3eb14344c41c32d8802268\",\"query\":\"read a web page as markdown\"}","tags":["paid"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.001"},"protocols":[{"x402":{}}]},"x-x402":{"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F","amount":"1000","assetSymbol":"USDC","x402Versions":[2,1],"networks":[{"network":"eip155:8453","name":"Base","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","symbol":"USDC","payTo":"0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F"},{"network":"eip155:137","name":"Polygon","asset":"0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359","symbol":"USDC","payTo":"0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F"},{"network":"eip155:42161","name":"Arbitrum One","asset":"0xaf88d065e77c8cC2239327C5EDb3A432268e5831","symbol":"USDC","payTo":"0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F"}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"set_id":{"type":"string","description":"set_id (\"ts_...\" from register, or a ToolFit pin)."},"tools":{"type":"array","items":{"type":"object"},"description":"Tool definitions (MCP, OpenAI, Anthropic, Gemini or Bedrock form), max 500. For route: only if you have no set_id (the set is registered on the fly)."},"query":{"type":"string","description":"The task or user request to route, e.g. \"check if this wallet is sanctioned\"."},"k":{"type":"integer","minimum":1,"maximum":50,"description":"Fixed shortlist size (default adaptive)"},"max_k":{"type":"integer","minimum":1,"maximum":50,"description":"Upper bound for the adaptive size (default 12)"},"format":{"type":"string","enum":["mcp","openai","anthropic","gemini","names"],"description":"Definition format (default mcp; names = names only)"}},"required":["query"]}}}},"responses":{"200":{"description":"shortlist with scores and matched terms, confidence, widened flag, token savings, definitions in the chosen format; drift (with a warning) when the set was registered from a URL that now lists a different tool set. (payment settled)","content":{"application/json":{"example":{"set_id":"ts_0d467a406d3eb14344c41c32d8802268","query":"read a web page as markdown","confidence":"high","widened":false,"shortlist":[{"name":"read_url","score":14.23,"matched":["read","web","page","markdown"]},{"name":"scan_url","score":8.09,"matched":["read","web","page"]},{"name":"detect_stack","score":7.05,"matched":["web","page"]}],"tokens":{"all":11585,"shortlist":1278,"saved_pct":89}}}}},"400":{"description":"Invalid input (never charged)"},"402":{"description":"Payment Required (x402 v2 terms in the PAYMENT-REQUIRED header, v1 terms in the body)"},"404":{"description":"Unknown pin (never charged)"},"413":{"description":"Body too large (never charged)"},"422":{"description":"Remote MCP server could not be listed (never charged)"},"503":{"description":"Timeout or pin store unavailable (never charged)"}}}},"/v1/register":{"post":{"operationId":"toolroute_register","summary":"Free: Register a tool set (tools array or remote MCP URL) and get its set_id","description":"Free. Stores the normalized tool definitions under their hash (same tools = same set_id) for 90 days after last use. Send tools (array) or url (public remote MCP server; tools are listed, never called).","tags":["free"],"security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tools":{"type":"array","items":{"type":"object"},"description":"Tool definitions (MCP, OpenAI, Anthropic, Gemini or Bedrock form), max 500. For route: only if you have no set_id (the set is registered on the fly)."},"url":{"type":"string","description":"Register: public remote MCP server URL (https). Tools are listed, never called."}}}}}},"responses":{"200":{"description":"set_id, tool count, total token estimate, stored flag. Free, rate-limited per IP."},"400":{"description":"Invalid input"},"429":{"description":"Rate limited"}}}},"/mcp":{"post":{"operationId":"toolroute_mcp","summary":"Free remote MCP (Streamable HTTP, JSON-RPC): register_tools, route_tools","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"JSON-RPC result"},"202":{"description":"Notification accepted"}}}}},"x-x402-networks":[{"network":"eip155:8453","name":"Base","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","symbol":"USDC","payTo":"0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F"},{"network":"eip155:137","name":"Polygon","asset":"0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359","symbol":"USDC","payTo":"0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F"},{"network":"eip155:42161","name":"Arbitrum One","asset":"0xaf88d065e77c8cC2239327C5EDb3A432268e5831","symbol":"USDC","payTo":"0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F"}]}