Skip to main content
Glama

compare_costs

Compare costs for multiple LLM models. Every named model is priced; pass client (e.g. 'claude_code') to also flag each model runnable_in_client (it never filters here). Recognised clients: claude_code, claude_desktop, cursor, github_copilot, windsurf, cline, continue, zed, jetbrains_ai, gemini_cli, codex_cli, aider, amazon_q, chatgpt_desktop.

Input Schema

NameRequiredDescriptionDefault
clientNoYour MCP client / coding tool, so only models it can run are considered. Recognised: claude_code, claude_desktop, cursor, github_copilot, windsurf, cline, continue, zed, jetbrains_ai, gemini_cli, codex_cli, aider, amazon_q, chatgpt_desktop. Case- and separator-insensitive ('Claude Code' = claude_code). Order: explicit client > legacy ide_context > client inferred from the MCP handshake (hosted server, best effort) > none. Unknown names return an unfiltered result plus a note.
countryNoOptional ISO-3166 alpha-2 country whose currency to use (e.g. DE -> EUR, IN -> INR). A country whose currency is unsupported yields USD with fallback_to_usd=true.
currencyNoOptional ISO-4217 code to convert prices into, alongside the canonical USD figures. Beats country. Unsupported codes return success=false listing the supported set.
model_namesYesList of model names to compare (at most 50)
input_tokensYesNumber of input tokens
output_tokensYesNumber of output tokens

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / client
      Added value: +{
      +  "description": "Your MCP client / coding tool, so only models it can run are considered. Recognised: claude_code, claude_desktop, cursor, github_copilot, windsurf, cline, continue, zed, jetbrains_ai, gemini_cli, codex_cli, aider, amazon_q, chatgpt_desktop. Case- and separator-insensitive ('Claude Code' = claude_code). Order: explicit client > legacy ide_context > client inferred from the MCP handshake (hosted server, best effort) > none. Unknown names return an unfiltered result plus a note.",
      +  "type": "string"
      +}
  2. Changed2 schema fields changed
    • changedInput schema / properties / model_names / description
      Previous value: -"List of model names to compare"New value: +"List of model names to compare (at most 50)"
    • addedInput schema / properties / model_names / maxItems
      Added value: +50
  3. Changed2 schema fields changed
    • addedInput schema / properties / country
      Added value: +{
      +  "description": "Optional ISO-3166 alpha-2 country whose currency to use (e.g. DE -> EUR, IN -> INR). A country whose currency is unsupported yields USD with fallback_to_usd=true.",
      +  "maxLength": 2,
      +  "minLength": 2,
      +  "type": "string"
      +}
    • addedInput schema / properties / currency
      Added value: +{
      +  "description": "Optional ISO-4217 code to convert prices into, alongside the canonical USD figures. Beats country. Unsupported codes return success=false listing the supported set.",
      +  "enum": [
      +    "USD",
      +    "EUR",
      +    "GBP",
      +    "INR",
      +    "JPY",
      +    "CAD",
      +    "AUD",
      +    "BRL",
      +    "CNY",
      +    "SGD",
      +    "CHF",
      +    "KRW",
      +    "MXN"
      +  ],
      +  "type": "string"
      +}
  4. First observed

TDQS

A3.6/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does add real behavioral context: every named model is priced regardless of client, and client only annotates rather than filters. This usefully corrects the misleading 'only models it can run are considered' phrasing in the schema. It still omits return shape and currency-conversion behavior.

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

Conciseness3/5

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

The front-loaded purpose and the client semantics are efficient, but the third sentence enumerates all 15 recognised clients, duplicating the schema enum verbatim and bloating the description without adding information. Roughly a third of the text is redundant.

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?

For a 6-parameter tool with no output schema and no annotations, the description covers only model_names and client. It says nothing about what the comparison returns (per-model cost breakdowns, currency conversion via country/currency, fallback flags), leaving the agent to infer the response.

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 coverage is 100%, so baseline is 3, but the description adds the crucial nuance that client never filters results — the opposite of what the schema text implies — which materially changes how an agent interprets the output. Country/currency parameters are left entirely to the schema.

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 opens with a specific verb+resource ('Compare costs for multiple LLM models') that separates it from single-cost siblings like estimate_cost or predict_cost. It does not name those siblings explicitly, so differentiation is implied by 'multiple' rather than stated.

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?

Usage is implied: use this when you have several model names and want side-by-side pricing. The client argument's role is clarified ('also flag each model runnable_in_client'), but there is no explicit when-not or named alternative such as estimate_cost for a single model.

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.