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.

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

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_monthNoHow many times the prompt runs in a month, across all users (default 1,000).

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
    • addedInput schema / properties / calls_per_month / description
      Added value: +"How many times the prompt runs in a month, across all users (default 1,000)."
  2. 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"
      +}
  3. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and closed-world, so safety needs no restating. The description adds genuinely new context: the pricing comes from thinkhard.si's catalog verified against provider pricing pages, which tells the agent how much to trust the numbers. It stops short of noting currency, estimate precision, or how model pricing changes over time.

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, front-loaded with the verb and outcome, second sentence carrying the input-mode choice. Nothing redundant and nothing buried.

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 values need no explanation, all five parameters are documented, and the annotations are rich. The only real gap is that the description never says what the estimate is denominated in or how model coverage defaults are resolved, both of which an agent might want before calling.

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% and each parameter is documented, including the 'omit to estimate from prompt_text' relationship. The description only restates the token-count-or-prompt-text choice, adding no format, unit, or interaction detail beyond the schema. 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?

A specific verb ('Estimate') plus resource ('monthly cost of running a prompt') and explicit coverage of model families. It is obviously distinct from the sibling prompt-authoring tools (grade_prompt, get_prompt_pattern, etc.), so an agent can route to it without ambiguity.

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?

'Give token counts, or paste the prompt text to estimate them' tells the agent how to supply input, which is real usage guidance. But there is no statement of when this tool is appropriate versus when to skip it, and no prerequisites or caveats are named.

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