Skip to main content
Glama

ai_tool_select

Read-only

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

NameRequiredDescriptionDefault
queryYese.g. what will the weather be in Denver tomorrow
toolsYese.g. get_weather: forecast for a city; search_flights: find flights between two airports; get_stock: latest stock price

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already establish readOnly/openWorld/non-destructive, and the description goes well beyond them: it enumerates the response payload (best tool, arguments, confidence, missing required parameters, clarifying question, alternatives, BM25 keyword cross-check), states the 40-tool ceiling, discloses the rejection-and-fallback behavior for hallucinated tool names, and even names the backend (Workers AI) and price ($0.006 USDC via x402). That is unusually rich disclosure of behavior the agent could not infer from annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core purpose and the return payload are front-loaded, and nearly every clause carries information (formats, limits, fallback, pricing). It is dense to the point of being run-on, with parenthetical asides and semicolon-chained lists, so an agent must parse carefully, but no sentence is genuinely expendable.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, so the description carries the burden of describing return values — and it does so explicitly, including the confidence score, missing-parameter list, clarifying question, and alternatives. Combined with the input-format rules, the tool cap, and the fallback semantics, an agent has everything needed to call it and interpret the result.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, but the schema descriptions are only bare examples, whereas the description specifies the exact accepted encodings for `tools` — 'name: description; name2: description2', a JSON array of {name,description}, or OpenAI tool objects — and notes that parameters.required is checked and the list is capped at 40. This adds real, call-shaping meaning beyond the schema rather than restating it.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb+resource: 'AI tool router (pick the right tool + arguments)', and immediately specifies the input (a user request plus a tool list) and the output (the single best tool with filled-in arguments). An agent knows exactly what this does. It stops short of a 5 because it never contrasts itself with the near-identically-named sibling ai_tool_router, leaving the agent to guess which router to call.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is clearly implied by 'give a user request and your tool list', which tells the agent the situation this tool fits, and the fallback note ('Unknown tool names ... fall back to the keyword match') hints at reliability expectations. However there is no explicit when-not-to-use guidance and no named alternative for the routing decision, so it stays at the minimum-viable-plus level.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources