Skip to main content
Glama

llm_reroute

Override the last routing decision when the wrong model was chosen, and log the correction to improve future routing quality.

Instructions

Override the last routing decision and record it for feedback learning.

Logs the correction to the database so future routing decisions for this
task type have lowered confidence. Use this when llm_route, llm_query,
llm_code, or any other tool chose the wrong model for your task.

Args:
    to_tool: Which tool to use instead (e.g. "llm_analyze", "llm_code").
    reason: Optional explanation — stored for routing quality improvement.
    original_tool: The tool that made the wrong decision (auto-detected if omitted).
    original_model: The model that was selected (for logging purposes).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
to_toolYes
reasonNo
original_toolNo
original_modelNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations, the description carries full burden. It discloses that the tool logs corrections to the database and lowers confidence for future routing decisions. It describes parameter behavior. It could mention side effects like irreversibility or permission requirements, but overall is good.

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 well-structured with a brief intro and an Args list. It is concise, front-loaded with the key action, and every sentence adds value. No redundant information.

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?

Given the tool's complexity, lack of annotations, and presence of an output schema, the description is complete. It covers purpose, usage context, parameter details, and behavioral effect. The output schema covers return values as per the rule, so no gap.

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 description coverage is 0%, so description must add meaning. It provides clear descriptions for all four parameters in the Args section, with examples and explanations (e.g., 'Which tool to use instead (e.g. "llm_analyze", "llm_code")' and 'auto-detected if omitted'). This adds significant value beyond the schema.

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?

Description clearly states the tool overrides the last routing decision and logs it for feedback learning. It distinguishes from siblings like llm_route and provides explicit examples of when to use it (e.g., when llm_route, llm_query, or llm_code chose the wrong model).

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

Usage Guidelines4/5

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

The description explicitly says 'Use this when llm_route, llm_query, llm_code, or any other tool chose the wrong model for your task.' It provides actionable context and mentions that original_tool is auto-detected. It could be improved by adding when not to use, but the positive case is clear.

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/ypollak2/llm-router'

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