Skip to main content
Glama

Route Provider

route_provider
Read-onlyIdempotent

Rank up to 1,000 caller-supplied providers by quality, success rate, price and latency, returning one selection plus at most three alternates. Candidates marked unhealthy or priced above requirements.maxPrice are excluded; quality defaults to successRate and an empty eligible set returns selected=null with a reason. Use this free read-only calculation only with comparable metrics you already hold because it neither discovers providers nor verifies measurements.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
providersYesUp to 1,000 provider candidates to rank. An empty list returns no eligible provider; unhealthy candidates are excluded.
requirementsNoRouting constraints. maxPrice is the currently enforced constraint.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
reasonYesHuman-readable explanation of the routing result.
selectedYesHighest-ranked eligible provider, including its computed score, or null.
alternatesYesUp to three next-ranked eligible providers.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / providers / description
      Previous value: -"Provider candidates to rank. Unhealthy candidates are excluded."New value: +"Up to 1,000 provider candidates to rank. An empty list returns no eligible provider; unhealthy candidates are excluded."
    • addedInput schema / properties / providers / maxItems
      Added value: +1000
  2. Changed8 schema fields changed
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / description
      Added value: +"Rank a caller-supplied provider set. ARN does not discover providers or independently verify these metrics in this free call."
    • addedInput schema / properties / providers / description
      Added value: +"Provider candidates to rank. Unhealthy candidates are excluded."
    • addedInput schema / properties / providers / items
      Added value: +{
      +  "additionalProperties": true,
      +  "description": "Caller-supplied provider candidate and measured/estimated routing attributes.",
      +  "properties": {
      +    "healthy": {
      +      "default": true,
      +      "description": "Set false to exclude this provider from routing.",
      +      "type": "boolean"
      +    },
      +    "id": {
      +      "description": "Optional stable provider identifier.",
      +      "type": "string"
      +    },
      +    "latencyMs": {
      +      "default": 1000,
      +      "description": "Comparable latency in milliseconds.",
      +      "minimum": 0,
      +      "type": "number"
      +    },
      +    "name": {
      +      "description": "Optional provider display name.",
      +      "type": "string"
      +    },
      +    "price": {
      +      "default": 0,
      +      "description": "Comparable per-execution price used by the ranking formula.",
      +      "minimum": 0,
      +      "type": "number"
      +    },
      +    "quality": {
      +      "description": "Observed or estimated quality score. Defaults to successRate.",
      +      "maximum": 1,
      +      "minimum": 0,
      +      "type": "number"
      +    },
      +    "successRate": {
      +      "default": 0.5,
      +      "description": "Observed or estimated success rate.",
      +      "maximum": 1,
      +      "minimum": 0,
      +      "type": "number"
      +    }
      +  },
      +  "type": "object"
      +}
    • addedInput schema / properties / requirements / additionalProperties
      Added value: +true
    • addedInput schema / properties / requirements / description
      Added value: +"Routing constraints. maxPrice is the currently enforced constraint."
    • addedInput schema / properties / requirements / properties
      Added value: +{
      +  "maxPrice": {
      +    "description": "Optional maximum provider price. Providers above it are excluded.",
      +    "minimum": 0,
      +    "type": "number"
      +  }
      +}
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "alternates": {
      +      "description": "Up to three next-ranked eligible providers.",
      +      "items": {
      +        "type": "object"
      +      },
      +      "maxItems": 3,
      +      "type": "array"
      +    },
      +    "reason": {
      +      "description": "Human-readable explanation of the routing result.",
      +      "type": "string"
      +    },
      +    "selected": {
      +      "description": "Highest-ranked eligible provider, including its computed score, or null.",
      +      "type": [
      +        "object",
      +        "null"
      +      ]
      +    }
      +  },
      +  "required": [
      +    "selected",
      +    "alternates",
      +    "reason"
      +  ],
      +  "type": "object"
      +}
  3. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, not open-world), yet the description still adds substantive behavior: exclusion of unhealthy and over-maxPrice candidates, quality defaulting to successRate, and the empty-eligible-set fallback returning selected=null with a reason. This is real context beyond structured fields.

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?

Front-loads the operation and result, then the exclusion rules, then the usage caveat — a logical order with no filler. It is a dense single paragraph and the final clause about being 'free read-only' lightly overlaps annotation territory, but nothing is off-topic.

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?

For a tool with nested input objects, a 100% covered schema, an output schema, and full annotations, the description supplies the remaining decision-relevant facts: exclusions, defaults, the 1000 cap, and the null-return edge case. An agent has everything needed to invoke and interpret it.

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

Parameters4/5

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

Schema description coverage is 100%, so the baseline is 3; the description earns above that by explaining cross-parameter semantics — that the 1000-item list is caller-supplied, that unhealthy candidates are dropped, and that maxPrice filters the set. It does not, however, detail the ranking formula weights.

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?

States a specific verb and resource ('Rank up to 1,000 caller-supplied providers by quality, success rate, price and latency') plus the exact return shape (one selection plus at most three alternates). No sibling in this utility set does provider ranking, so it is clearly distinguishable.

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

Usage Guidelines5/5

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

Explicitly bounds usage: 'Use this free read-only calculation only with comparable metrics you already hold because it neither discovers providers nor verifies measurements.' It states both the qualifying condition and the two things the tool will not do, removing any inference about scope.

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