Skip to main content
Glama

HALOWERK: Estimate token use and price for a prompt across several models before you spend

cost_estimate
Read-only

Calculate prompt costs across multiple AI models before spending. Input text or token count and expected output length to get per-model pricing, including cache and batch discounts.

Instructions

Estimate token use and price for a prompt across several models before you spend anything, including cache and batch discounts.

Kostenpflichtig: 0.002 USDC je Aufruf. Bezahlt per x402 auf Base, ohne Konto. Hoechstens 0.002 USDC je Aufruf.

Works out what a call would cost. Give either the text itself or a token count, plus the expected output length, and get input, output, cache-read and cache-write cost per model with the total. Token counts derived from text are estimates from character and word statistics, not a tokeniser, and typically land within about 15 percent — where an exact count matters, count with the vendor tokeniser. Prices come from a table with a stated date; a model whose price has moved since is reported with its table date, so an old figure is visible rather than silently wrong. Unknown model names are refused with the closest matches rather than guessed. Preis 0.002 USDC je Aufruf, Abrechnung über x402.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textNoThe prompt text. Either this or input_tokens.
batchNoApply the batch discount where the model has one.
callsNoNumber of identical calls to multiply by.
modelsNoModel ids to price. All known models if omitted.
input_tokensNoKnown input token count. Either this or text.
output_tokensNoExpected output length in tokens.
cached_input_tokensNoOf the input tokens, how many are served from cache.
Behavior5/5

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

The description goes far beyond the annotations. It discloses estimation methodology and accuracy ('estimates from character and word statistics, not a tokeniser, and typically land within about 15 percent'), pricing table staleness ('a model whose price has moved since is reported with its table date'), and unknown-model handling ('refused with the closest matches rather than guessed'). This is rich behavioral context beyond the safety hints.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the core purpose and well-structured English text. However, it repeats the German pricing information at both the beginning and end ('Kostenpflichtig: 0.002 USDC je Aufruf...' and 'Preis 0.002 USDC je Aufruf...'), which is redundant and adds ~30 unnecessary words. Otherwise, every sentence carries useful information, so it's only slightly over-length.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 7-parameter, all-optional tool with no output schema, the description provides a complete picture: what it does, what inputs to provide (text or token count, output length, cache/batch), what outputs to expect (input, output, cache-read, cache-write cost per model with total), accuracy caveats, pricing table date, unknown-model refusal, and the per-call fee. This is comprehensive and leaves no major gaps.

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. The description adds meaning by explaining the either/or relationship between 'text' and 'input_tokens' ('Give either the text itself or a token count'), the role of 'output_tokens' ('plus the expected output length'), and the cache/batch discounts tied to 'cached_input_tokens' and 'batch'. It doesn't mention 'calls' or 'models' explicitly, but the schema already covers those, so the added value justifies a 4.

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 opens with a specific verb+resource phrase: 'Estimate token use and price for a prompt across several models before you spend anything.' It clearly distinguishes itself from siblings by focusing on pre-spend estimation of token counts and costs, including cache and batch discounts. The second sentence 'Works out what a call would cost' reinforces the unique purpose.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly tells when to use the tool ('before you spend anything') and provides input instructions ('Give either the text itself or a token count, plus the expected output length'). It also gives an explicit alternative for exact counts: 'where an exact count matters, count with the vendor tokeniser.' This meets the bar for when/when-not guidance with an alternative.

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/halowerk/halowerk-mcp'

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