Skip to main content
Glama

TokenMargin

get_llm_pricing

Search and retrieve live 2026 per-1M token pricing (input, output, cached read), context window, TTFT latency, throughput (tok/s), and cheapest inference host from TokenMargin.dev.

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": "get_llm_pricing"
  }
}

Input Schema

NameRequiredDescriptionDefault
tierNoOptional tier filter: frontier, reasoning, fast, open-weight
limitNoMax models to return (default 20, max 126)
queryNoOptional model name, slug, or provider filter (e.g. "claude", "deepseek", "qwen", "gpt-6", "sage")

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full disclosure burden, and it does establish key behavior: the data is live, sourced from TokenMargin.dev, and enumerates the fields returned (pricing units per 1M tokens, context window, TTFT, tok/s, cheapest host), which is valuable given there is no output schema. It still omits result ordering, behavior on empty matches, truncation semantics when limit is hit, freshness/refresh cadence, and any rate limits or auth needs.

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?

A single front-loaded sentence leads with the action and then enumerates what comes back, with no filler or repetition. The return-field enumeration is long but each item is load-bearing information given the absence of an output schema.

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?

For a low-risk, three-optional-parameter read tool with no output schema and no annotations, the definition covers action, data provenance, and returned fields, which is the core of what an agent needs. The remaining gaps are ordering, empty-result behavior, and freshness guarantees, which are secondary but not negligible.

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 schema already documents the tier enum values, the limit default and max of 126, and query examples. The description adds marginal but real meaning by framing these as search filters over a live pricing corpus and by implying multi-field retrieval, though it adds no per-parameter syntax or precedence details beyond 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 states a specific verb (search and retrieve) plus the exact resource and field set: per-1M token pricing, context window, TTFT latency, throughput, and cheapest host, along with the upstream source TokenMargin.dev. It does not name or contrast itself with the sibling tools compare_models or calculate_agent_loop_cost, so an agent cannot tell from the text alone whether pricing lookup should be routed here or through a comparison tool.

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 only implied by the word 'Search' and by the presence of an optional query/tier filter, which suggests ad-hoc lookup of model pricing. There is no explicit statement of when to prefer this tool over compare_models, no prerequisite or exclusion notes, and no guidance on whether to call it once per model or in bulk.

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