Skip to main content
Glama

route_prompt

Classifies a coding prompt by task type, then routes it to an optimal LLM among Claude, Gemini, and GPT-4o, balancing capability and cost.

Instructions

Routes a coding prompt to the best LLM (Claude, Gemini, GPT-4o) based on task type. Automatically classifies the task and selects the cheapest/most capable model.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
promptYesThe user's coding prompt or question
session_idNoOptional session ID for context continuity (default: 'default')
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It does reveal that the tool automatically classifies tasks and selects a model based on cost/capability, which is useful. However, it is ambiguous whether the tool actually executes the prompt or merely returns a model name/decision, and it does not mention output format, side effects, or whether network calls are made. This leaves key behavioral details undisclosed.

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

Conciseness5/5

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

The description is a concise, two-sentence explanation that immediately states the tool's purpose and key behavior. It front-loads the action and avoids unnecessary words, earning its place with no wasted detail.

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

Completeness3/5

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

The tool has moderate complexity with two parameters, no output schema, and no annotations. The description explains the core purpose and decision heuristic but does not clarify what is returned to the caller, which is a notable omission. It is adequate but incomplete for an agent that needs to understand the full contract of the tool.

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

Parameters3/5

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

Schema description coverage is 100%, so the parameters are already fully documented in the schema. The description adds little beyond reinforcing that 'prompt' is a coding prompt; it does not explain 'session_id' or add semantic context beyond the schema. Baseline 3 is appropriate because the schema does the heavy lifting.

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

Purpose5/5

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

The description names a specific verb ('Routes'), a resource ('a coding prompt'), and a clear objective (to the best LLM based on task type). This clearly distinguishes it from sibling tools like generate_code or implement_feature, which perform generation or implementation rather than routing/selection.

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?

The description implies when to use the tool—when you need an LLM selected for a coding prompt—but it does not explicitly state when not to use it or name alternatives. Sibling tools like generate_code are distinct, but no direct comparison or exclusion is provided, leaving usage guidance somewhat implicit.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Devatva24/LLM-Router-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server