Skip to main content
Glama

estimate_cost

Estimate AI model cost for planning by providing model name, input tokens, and output tokens.

Instructions

Estimate cost without logging it. Use for planning.

Args: model: Model name tokens_in: Expected input tokens tokens_out: Expected output tokens

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelYes
tokens_inYes
tokens_outYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

With no annotations, the description must disclose behavior. It states the tool does not log (read-only), but does not mention that it returns a cost estimate based on current pricing, or any accuracy/limitations. The existence of an output schema partially compensates.

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?

The description is extremely concise: two sentences and a structured args list. It front-loads the key purpose and leaves no waste. Every sentence adds value.

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 simple estimation tool with 3 parameters and an output schema, the description covers the basic intent. It lacks mention of approximation, currency, or error conditions, but these can be inferred or covered by the output schema.

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 coverage is 0%, so the description must explain parameters. It lists model, tokens_in, and tokens_out with brief but sufficient descriptions. However, it could clarify that tokens_in and tokens_out refer to the model's token count expectations.

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 clearly states the tool estimates cost without logging, explicitly distinguishing it from logging tools. The verb 'estimate' and resource 'cost' are specific, and the purpose 'for planning' sets clear scope.

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?

The description explicitly says 'without logging it' and 'Use for planning', which implies when to use (planning) and when not (logging). It does not explicitly mention alternatives, but sibling tools like log_cost and cost_report provide context.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/vanthienha199/agent-cost-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server