Skip to main content
Glama

Agent Toolbox

estimate_tokens

Estimate tokens and USD cost of a text across current frontier models (list prices verified 2026-10-16).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYes
output_tokensNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.2/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 behavioral burden. It does disclose a valuable trait — pricing list data 'verified 2026-10-16' — but says nothing about which specific models are covered, whether a network/model call is made, or whether results are cached or approximate.

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?

A single front-loaded sentence with the core action first and the freshness caveat in a parenthetical. No wasted wording, though the date could be trimmed without losing much.

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

Completeness3/5

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

No output schema and no annotations, so the description is the only spec. It establishes what is returned at a high level (token count and USD cost) but omits model coverage, the role of output_tokens, and precision/assumption details an agent would need to call it confidently.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate for both parameters. It only implicitly covers 'text' (the thing being estimated) and never explains 'output_tokens', which is non-obvious and presumably drives the cost estimate. The gap is significant for the only non-self-evident parameter.

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 two concrete resources (tokens, USD cost) scoped to a given text and a set of frontier models. The sibling tools (convert_schema, mcp_config, search_directory) are in unrelated domains, so confusion is unlikely even without an explicit contrast.

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 mention of 'USD cost ... across current frontier models' implies the use case (cost/size budgeting before sending a prompt), but there is no explicit when-to-use, when-not-to-use, or prerequisite statement. Usage must be inferred from the resource description.

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.

Resources