Skip to main content
Glama

Cheapest LLM providers

cheapest_model_route
Read-onlyIdempotent

Cheapest inference providers for one LLM (e.g. "deepseek-v3", "gpt-oss-120b"; use find_model if unsure of the name). Prices are USD per 1M tokens; estimated_cost_usd is for the given input/output token counts. One row per provider, cheapest first. limit: 1-10.

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": {
      "model": "<model>"
    },
    "name": "cheapest_model_route"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum rows to return, 1-10; values outside the range are clamped.
modelYesLLM name or slug (e.g. "gpt-oss-120b", "deepseek-v3"). Use find_model if unsure of the name.
input_tokensNoInput (prompt) tokens to price, for estimated_cost_usd. Default 1M.
output_tokensNoOutput (completion) tokens to price, for estimated_cost_usd. Default 1M.

Output Schema

NameRequiredDescriptionDefault
modelYesResolved model slug.
routesYesEach provider's cheapest route, cheapest estimated cost first.
source_urlYesMatching cheap-gpus.com page for this result.
attributionYesData source credit.
input_tokensYesInput tokens the cost estimate is for.
output_tokensYesOutput tokens the cost estimate is for.
provider_countYesProviders serving this model.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed10 schema fields changed
    • addedInput schema / properties / input_tokens / description
      Added value: +"Input (prompt) tokens to price, for estimated_cost_usd. Default 1M."
    • addedInput schema / properties / limit / description
      Added value: +"Maximum rows to return, 1-10; values outside the range are clamped."
    • addedInput schema / properties / model / description
      Added value: +"LLM name or slug (e.g. \"gpt-oss-120b\", \"deepseek-v3\"). Use find_model if unsure of the name."
    • addedInput schema / properties / model / examples
      Added value: +[
      +  "gpt-oss-120b",
      +  "deepseek-v3"
      +]
    • addedInput schema / properties / output_tokens / description
      Added value: +"Output (completion) tokens to price, for estimated_cost_usd. Default 1M."
    • addedOutput schema / $defs
      Added value: +{
      +  "ModelRoute": {
      +    "properties": {
      +      "context_length": {
      +        "anyOf": [
      +          {
      +            "type": "integer"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "Context window in tokens, when the provider reports it.",
      +        "title": "Context Length"
      +      },
      +      "estimated_cost_usd": {
      +        "description": "Cost for the requested input_tokens and output_tokens, USD.",
      +        "title": "Estimated Cost Usd",
      +        "type": "number"
      +      },
      +      "input_usd_per_1m": {
      +        "anyOf": [
      +          {
      +            "type": "number"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "Input (prompt) price, USD per 1M tokens.",
      +        "title": "Input Usd Per 1M"
      +      },
      +      "model_id": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "The provider's own model id, to use in its API.",
      +        "title": "Model Id"
      +      },
      +      "output_usd_per_1m": {
      +        "anyOf": [
      +          {
      +            "type": "number"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "Output (completion) price, USD per 1M tokens.",
      +        "title": "Output Usd Per 1M"
      +      },
      +      "provider": {
      +        "description": "Provider display name.",
      +        "title": "Provider",
      +        "type": "string"
      +      },
      +      "stale": {
      +        "description": "True if this provider's last sync failed and this is its last known price (up to 3 days old).",
      +        "title": "Stale",
      +        "type": "boolean"
      +      },
      +      "synced_at": {
      +        "anyOf": [
      +          {
      +            "format": "date-time",
      +            "type": "string"
      +          },
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "When this price was last fetched from the provider (ISO 8601, UTC).",
      +        "title": "Synced At"
      +      }
      +    },
      +    "required": [
      +      "provider",
      +      "model_id",
      +      "input_usd_per_1m",
      +      "output_usd_per_1m",
      +      "estimated_cost_usd",
      +      "context_length",
      +      "synced_at",
      +      "stale"
      +    ],
      +    "title": "ModelRoute",
      +    "type": "object"
      +  }
      +}
    • removedOutput schema / additionalProperties
      Removed value: -true
    • addedOutput schema / properties
      Added value: +{
      +  "attribution": {
      +    "description": "Data source credit.",
      +    "title": "Attribution",
      +    "type": "string"
      +  },
      +  "input_tokens": {
      +    "description": "Input tokens the cost estimate is for.",
      +    "title": "Input Tokens",
      +    "type": "integer"
      +  },
      +  "model": {
      +    "description": "Resolved model slug.",
      +    "title": "Model",
      +    "type": "string"
      +  },
      +  "output_tokens": {
      +    "description": "Output tokens the cost estimate is for.",
      +    "title": "Output Tokens",
      +    "type": "integer"
      +  },
      +  "provider_count": {
      +    "description": "Providers serving this model.",
      +    "title": "Provider Count",
      +    "type": "integer"
      +  },
      +  "routes": {
      +    "description": "Each provider's cheapest route, cheapest estimated cost first.",
      +    "items": {
      +      "$ref": "#/$defs/ModelRoute"
      +    },
      +    "title": "Routes",
      +    "type": "array"
      +  },
      +  "source_url": {
      +    "description": "Matching cheap-gpus.com page for this result.",
      +    "title": "Source Url",
      +    "type": "string"
      +  }
      +}
    • addedOutput schema / required
      Added value: +[
      +  "model",
      +  "input_tokens",
      +  "output_tokens",
      +  "provider_count",
      +  "routes",
      +  "source_url",
      +  "attribution"
      +]
    • changedOutput schema / title
      Previous value: -"cheapest_model_routeDictOutput"New value: +"ModelRoutes"
  2. First observed

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false and openWorldHint=false, so safety and side-effect behavior are fully covered structurally. The description adds genuinely useful non-annotation context — pricing is USD per 1M tokens, estimated_cost_usd corresponds to the supplied token counts, and results come back one row per provider sorted cheapest first. That is helpful but modest given how much the annotations already establish.

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 core purpose and pricing semantics in the first two clauses, then tacks on the result shape and limit range. Some tail content duplicates the schema (the 1-10 limit range and model examples appear in both places), but nothing is bloated.

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

Completeness4/5

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

With an output schema present and annotations covering safety, the description only needs to supply pricing units, result ordering, and the find_model escape hatch — and it does all three. The only minor gap is not contrasting it with cheapest_gpu or clarifying what happens for models with no listed provider.

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 all four parameters (model, limit, input_tokens, output_tokens) are already documented in the schema, including the clamping rule. The description mostly restates schema content (limit 1-10, example model names) and only lightly clarifies that estimated_cost_usd is computed from the given input/output token counts, so the baseline of 3 applies.

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?

Opens with a specific verb+resource ('Cheapest inference providers for one LLM') and immediately scopes it with examples and a note that it prices a single model. That cleanly separates it from siblings like find_model (name resolution) and cheapest_gpu (GPU pricing).

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?

Gives an explicit routing rule: 'use find_model if unsure of the name', which is the main prerequisite for calling it successfully. It stops short of stating when-not to use it (e.g. when the caller actually wants GPU cost, not inference cost), so it is clear context without full exclusions.

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