Skip to main content
Glama
Infinite LLM Auto-Fallback Router

Infinite LLM Auto-Fallback Router

route_chat_completion

Routes chat completion requests across a provider pool with automatic failover on HTTP 429, 402, and 5xx errors to maintain LLM call availability.

Instructions

Route a chat completion request across the configured provider pool with automatic HTTP 429/402/5xx failover.

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": {
      "messages": "<messages>"
    },
    "name": "route_chat_completion"
  }
}

Input Schema

NameRequiredDescriptionDefault
modelNogpt-4o
messagesYesOpenAI-style chat messages ({role, content}).
max_tokensNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.2.0

TDQS

B3/5.0
Behavior3/5

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

With no annotations present, the description carries the whole burden; it usefully discloses the automatic failover on HTTP 429/402/5xx, which is the key behavioral trait. It omits what happens when all providers fail, whether requests are retried or duplicated across providers (potentially non-idempotent and billable), and auth/cost implications.

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?

A single front-loaded sentence with zero filler; the failover condition is appended where it is most useful. Nothing is repeated or wasted.

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

Completeness2/5

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

There are no annotations and no output schema, so the description must explain the return shape, partial-failure semantics, and error surface for a network-routing tool — none of which it does. An agent knows what to route and that failover exists, but not what it gets back or how failures are reported.

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

Parameters2/5

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

Schema description coverage is only 33%, so the description should compensate, but it says nothing about model, max_tokens, or message shape beyond what the schema already declares. Only 'messages' is documented in the schema itself, and the provider/routing semantics of the model field are unaddressed.

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 uses a specific verb+resource pair ('route a chat completion request') and adds the provider pool as the scope, which is clearly distinct from siblings like list_provider_pool or check_router_health. It does not explicitly name an alternative, so it stops short of full sibling differentiation.

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

Usage Guidelines2/5

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

There is no statement of when to call this versus check_router_health, list_provider_pool, or a direct provider call, and no prerequisites or exclusions. The failover condition is described as behavior, not as a selection criterion for the agent.

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