Skip to main content
Glama

Estimate what an AI feature costs

estimate_ai_cost
Read-onlyIdempotent

Estimate the monthly cost of running a prompt on current AI models (Claude, GPT, Gemini, DeepSeek, Qwen and others), from thinkhard.si's price catalog, which is checked against each provider's pricing page. Give token counts, or paste the prompt text to estimate them.

Input Schema

NameRequiredDescriptionDefault
modelsNoOptional: model names or ids to include, such as "Claude Sonnet 5.5". Default: every current model.
prompt_textNoOptional: the prompt, to estimate input tokens (about 4 characters a token).
input_tokensNoInput tokens per call. Omit to estimate from prompt_text.
output_tokensNoOutput tokens per call.
calls_per_monthNo

Output Schema

NameRequiredDescriptionDefault
modelsYesCheapest first.
checkedYesWhen the prices were last checked against each provider.
input_tokensYes
output_tokensYes
calls_per_monthYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "calls_per_month": {
      +      "type": "integer"
      +    },
      +    "checked": {
      +      "description": "When the prices were last checked against each provider.",
      +      "type": "string"
      +    },
      +    "input_tokens": {
      +      "type": "integer"
      +    },
      +    "models": {
      +      "description": "Cheapest first.",
      +      "items": {
      +        "properties": {
      +          "input_per_million": {
      +            "description": "US dollars per million input tokens.",
      +            "type": "number"
      +          },
      +          "model": {
      +            "type": "string"
      +          },
      +          "monthly_usd": {
      +            "description": "US dollars a month.",
      +            "type": "number"
      +          },
      +          "note": {
      +            "description": "Empty unless something about the price needs saying.",
      +            "type": "string"
      +          },
      +          "output_per_million": {
      +            "description": "US dollars per million output tokens.",
      +            "type": "number"
      +          },
      +          "per_call_usd": {
      +            "description": "US dollars per call.",
      +            "type": "number"
      +          },
      +          "ref": {
      +            "description": "Provider and model id.",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "model",
      +          "ref",
      +          "per_call_usd",
      +          "monthly_usd",
      +          "input_per_million",
      +          "output_per_million",
      +          "note"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "output_tokens": {
      +      "type": "integer"
      +    }
      +  },
      +  "required": [
      +    "checked",
      +    "calls_per_month",
      +    "input_tokens",
      +    "output_tokens",
      +    "models"
      +  ],
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false, and openWorldHint=false, so safety is covered. The description still earns credit for disclosing data provenance and freshness posture — a curated catalog verified against each provider's pricing page — which tells the agent how much to trust the numbers. It does not state currency, whether prices are per-1M tokens, or that results are approximations that drift as pricing changes.

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

Conciseness5/5

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

Two sentences with zero waste: the first delivers purpose, model coverage, and data source; the second delivers the input-mode rule. Purpose is front-loaded before caveats, and every clause carries information.

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?

An output schema exists, so return-value shape need not be explained, and the description covers model scope, input flexibility, and data provenance for a zero-required-parameter tool. The gap is the cost basis — currency, per-token vs. per-1M normalization, and whether the result assumes uniform calls_per_month — which an agent may need to present results correctly.

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 80%, so the schema already documents models, prompt_text, input_tokens, output_tokens, and calls_per_month in detail. The description's "give token counts, or paste the prompt text" restates the prompt_text/input_tokens relationship the schema already spells out ("Omit to estimate from prompt_text"). It adds nothing about calls_per_month or the default 500 output tokens, so the baseline 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?

The description names a specific verb (estimate), the resource (monthly cost of running a prompt), and the scope (current models across Claude, GPT, Gemini, DeepSeek, Qwen, and others). The data source (thinkhard.si's catalog, cross-checked against provider pricing pages) further anchors it, and nothing about it overlaps with get_prompt, grade_prompt, list_collections, or search_prompts.

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?

"Give token counts, or paste the prompt text to estimate them" tells the agent the two valid input modes and when to prefer each, which is exactly the decision an agent faces. It stops short of naming exclusions or stating that this is an estimate-only tool with no live billing lookup, so it is clear context rather than fully explicit routing.

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