Skip to main content
Glama

Estimate agent cost

estimate_cost
Read-only

Estimate the monthly API cost of an AI agent or chatbot on one model. Easiest: pass model + preset (chatbot, rag, coding_agent, research_agent). Or give input_tokens, output_tokens and calls_per_day (plus optional steps_per_task, cached_percent); explicit numbers override the preset.

Input Schema

NameRequiredDescriptionDefault
modelYesModel id like anthropic/claude-sonnet-5.5, or a name like "Grok 4.7"
presetNoOptional workload preset that fills in token defaults: chatbot, rag, coding_agent, research_agent. Explicit numbers override it.
input_tokensNoInput tokens per call/step
calls_per_dayNoCalls (or agent tasks) per day
output_tokensNoOutput tokens per call/step
cached_percentNoShare of input billed at the cached price, 0-100 (default 50 if steps_per_task>1, else 0)
steps_per_taskNoModel calls per task for multi-step agents (default 1)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so safety is covered; the description adds genuine behavioral detail: presets fill in token defaults, explicit numbers override them, and cached_percent/steps_per_task have environment-implied defaults. It stops short of saying what the response contains (monthly total only? breakdown?) despite there being no output schema.

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 outcome and then the 'Easiest:' shortcut. Every clause carries information — no restatement of the title or filler.

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 7-parameter read-only calculator with a fully documented schema and no output schema, the description is nearly sufficient. The gap is the shape of the result: it never says whether the estimate is a single monthly figure, includes per-call breakdown, or what currency/units are used.

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 every parameter is already documented, including the default logic for cached_percent and steps_per_task. The description reinforces the preset-versus-explicit-number precedence, which is a useful relationship the schema only states per-field, but it adds little beyond that baseline.

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 opens with a specific verb and resource: 'Estimate the monthly API cost of an AI agent or chatbot on one model.' The 'on one model' phrasing implicitly separates it from compare_models, but no sibling is named explicitly, so differentiation rests on inference.

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 gives two concrete usage paths — 'Easiest: pass model + preset' versus supplying input_tokens, output_tokens and calls_per_day — and states the override rule. What's missing is guidance on which path to prefer when both are plausible, or any mention of when a sibling like get_model_price would be the better call.

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.