Skip to main content
Glama

Agent Data Tools: Utilities

LLM pricing, compare AI model API prices

llm_prices
Read-only

Compare the API prices of about 450 LLMs from OpenAI, Anthropic, Google, Meta, Mistral, DeepSeek, Qwen and others: USD per million input and output tokens, context length, max output, modalities, and the cost of your call when you give token counts. Filter by name, provider, price cap, context or image input; sort by input, output or blended price. Source: OpenRouter's public model list. Use to pick the cheapest model that fits a job. Example: q=llama. Price $0.01/call via x402 USDC or a card key (/credits), first 10 free; failed calls free. Reads or computes only and changes nothing; each call is charged, so repeats are not free.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "llm_prices"
  }
}

Input Schema

NameRequiredDescriptionDefault
qNoWords in the model id or name, e.g. gpt, claude, llama 70b
sortNoinput (default), output, blended (3:1 input:output) or context
limitNoNumber of models (1-50, default 20)
visionNotrue: only models that take image input
providerNoOnly this provider: openai, anthropic, google, meta-llama, mistralai, deepseek, qwen…
minContextNoOnly models with at least this context length in tokens
inputTokensNoInput tokens of your call, to estimate its cost
outputTokensNoOutput tokens of your call, to estimate its cost
maxInputPriceNoOnly models at or under this USD per million input tokens

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changed
    • changedInput schema / properties / inputTokens / maximum
      Previous value: -9007199254740991New value: +100000000
    • changedInput schema / properties / inputTokens / minimum
      Previous value: --9007199254740991New value: +0
    • changedInput schema / properties / limit / maximum
      Previous value: -9007199254740991New value: +50
    • changedInput schema / properties / limit / minimum
      Previous value: --9007199254740991New value: +1
    • changedInput schema / properties / minContext / maximum
      Previous value: -9007199254740991New value: +100000000
    • changedInput schema / properties / minContext / minimum
      Previous value: --9007199254740991New value: +0
    • changedInput schema / properties / outputTokens / maximum
      Previous value: -9007199254740991New value: +100000000
    • changedInput schema / properties / outputTokens / minimum
      Previous value: --9007199254740991New value: +0
  2. Added

TDQS

A4.4/5.0
Behavior5/5

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

Beyond the readOnly/destructive annotations it discloses the commercial model ($0.01/call via x402 USDC or card key, first 10 free, failed calls free) and explicitly warns that repeats are not free, which explains the idempotentHint=false annotation rather than contradicting it. It also states the operation 'reads or computes only and changes nothing' and gives data provenance, so the agent knows the cost and side-effect profile before calling.

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-loaded with the capability and the data returned, followed by filters, an example, and then pricing terms in a logical order. Slightly heavy: the provider roll-call duplicates schema examples and the title text, costing a few words without adding decision value.

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?

With no output schema, the description carries the burden of describing the returned fields, and it does so (per-token prices, context length, max output, modalities, computed call cost). Pricing, provenance, free tier, and the optional zero-required-parameter nature are all covered for a nine-parameter query tool.

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 coverage is 100%, so all nine parameters, including defaults for sort and limit, are already documented in the schema. The description's summary of filters and sort modes largely restates those fields, with no added syntax, format, or interaction detail beyond the schema (e.g., how minContext and maxInputPrice combine). Baseline 3 is appropriate.

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?

The description gives a specific verb and resource ('Compare the API prices of about 450 LLMs'), lists the data returned (USD per million input/output tokens, context length, max output, modalities, computed call cost), and names the data source (OpenRouter's public model list). This clearly separates it from sibling price tools like hyperliquid_prices and from the ai_model_* completion tools.

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?

It states a concrete use case ('Use to pick the cheapest model that fits a job') and supplies a worked example ('q=llama'), plus an inventory of filter and sort options. It does not name a specific alternative tool or state when not to use it, so routing is clear but not fully comparative.

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