Skip to main content
Glama

chimera_cost_estimate

Estimate token count and USD cost for text or messages. No API call. Supports Claude, GPT, Gemini models.

Instructions

Estimate token count and USD cost for text or messages. No API call. Supports Claude, GPT, Gemini models.

Input Schema

NameRequiredDescriptionDefault
textNoRaw text to estimate. Use instead of messages for single strings.
modelNoModel name. Default: claude-sonnet-4-6. Supported: claude-opus-4-7, claude-sonnet-4-6, claude-haiku-4-5, claude-opus-4-5, claude-sonnet-4-5, claude-haiku-3-5, gpt-4o, gpt-4o-mini, gpt-4-turbo, gemini-1.5-pro, gemini-1.5-flashclaude-sonnet-4-6
messagesNoMessage list [{role, content}] to estimate. Use instead of text.
output_tokensNoExpected output tokens (for total cost). Default 0 (input only).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.8.4
    • addedInput schema / properties / messages / items
      Added value: +{
      +  "properties": {
      +    "content": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "array"
      +        }
      +      ],
      +      "description": "Message text, or a list of content blocks ({type: text, text})."
      +    },
      +    "role": {
      +      "description": "user | assistant | system",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "content"
      +  ],
      +  "type": "object"
      +}
  2. First observedv0.8.1

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the full disclosure burden and does deliver the key trait 'No API call', meaning no side effects or network/latency cost. It stops short of describing error handling for unsupported model names, whether estimates are deterministic, or any auth requirements.

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?

Three short sentences, front-loaded with the core action and immediately followed by the most decision-relevant constraint (no API call) and scope. Every sentence earns its place with zero redundancy.

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 zero-required-parameter estimation tool with no output schema, the description conveys the return semantics (token count and USD cost) and the no-side-effect nature, which is what an agent needs before calling. Minor gaps remain around response shape and behavior on invalid models.

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%, so the schema already documents text, model, messages, and output_tokens thoroughly. The description adds only the provider families supported; it does not explain semantics like mutual exclusivity of text vs messages beyond what the schema states, so the baseline 3 applies.

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?

States a specific verb (estimate) and resources (token count and USD cost) for text or messages, which an agent can distinguish from cost_track or budget siblings. It does not, however, explicitly contrast itself with those siblings, so the differentiation relies on the tool name rather than the description.

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?

The description implies usage context (use for pre-flight estimation of token/cost on text or messages) and clarifies it performs no API call, which frames it as a dry-run. It never states when not to use it or names an alternative such as chimera_cost_track for actual usage.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.