Skip to main content
Glama

cost-estimate

Estimate the USD cost of a prompt before sending it to Claude. Uses a heuristic (chars/4) with a ±30% range to return estimated input/output tokens and cost.

Instructions

Estima custo USD de um prompt ANTES de mandar para Claude. Heurística chars/4 com range ±30% (sem tokenizer real na v1.37.0 — debt em SKILL.md). Retorna estimated_input_tokens, estimated_output_tokens, estimated_usd, estimated_usd_range:[low,high], disclaimer. Triggers: "quanto vai custar", "estimativa de prompt", "estimate cost", "price this prompt".

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesTexto do prompt a estimar.
modelNoModelo alvo. Default: claude-sonnet-4-5.
output_ratioNoMultiplicador input → output esperado. Default: 3.
chars_per_tokenNoOverride heurística. Default: 4.
Behavior4/5

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

No annotations provided, so description carries full burden. It discloses the heuristic (chars/4 with ±30% range), return fields, and known limitation (debt in SKILL.md). This provides good transparency about what the tool does and its accuracy.

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 a single sentence that efficiently packs purpose, algorithm, limitations, return values, and triggers. Every clause adds value without 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?

Given 4 well-documented parameters, no output schema, and no annotations, the description provides sufficient context: algorithm, return values, and limitation. It is nearly complete, though the disclaimer content is not elaborated.

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 100%, so baseline is 3. Description adds meaning by explaining the heuristic (chars/4) and mentioning that return values include estimated tokens and costs. The output_ratio parameter context is indirectly covered by the return description.

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 USD cost of a prompt before sending to Claude, using a heuristic. It distinguishes from sibling cost tools (cost-blocks, cost-phase, etc.) by specifying it's for a single prompt. The list of triggers further clarifies the purpose.

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 implies use before sending to Claude and lists trigger phrases. It does not explicitly state when not to use or compare with siblings, but the heuristic and limitation ('sem tokenizer real') guide appropriate use for rough estimates.

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/luanpdd/kit-mcp'

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