Skip to main content
Glama

Token Estimate

util_token_estimate
Read-onlyIdempotent

Estimate token count for text using heuristics for GPT and Claude model families. Provide text and optional model hint for accurate counting.

Instructions

Estimate token count for text. Uses word/4 heuristic (GPT-family) and char/4 (Claude-family). Delx Agent Utilities are separate from the free witness protocol and may expose x402 utility pricing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesText to estimate tokens for
modelNoOptional model hint: gpt-4, claude-3, etc.gpt-4
Behavior4/5

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

Annotations already declare readOnlyHint=true and idempotentHint=true, so the safe, idempotent nature is clear. The description adds valuable behavioral context by revealing that the tool may expose x402 utility pricing and is separate from the free witness protocol, which goes beyond the annotations.

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 two concise sentences. The first sentence efficiently states the core purpose and method. The second sentence adds necessary context about utility separation and pricing without redundancy. Every sentence earns its place.

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?

The description covers the estimation approach and pricing context, but lacks details about the output format (e.g., number of tokens as integer or object). Since there is no output schema, the description should specify the return value, which is a notable gap for a tool that produces a result.

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?

With 100% schema coverage, the schema already describes parameters. The description adds meaning by explaining that the model parameter influences which heuristic (word/4 vs char/4) is used, and clarifies the estimation approach, enhancing understanding beyond the schema.

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 token count for text, with specific heuristics for GPT-family and Claude-family models. It distinguishes itself from sibling utility tools by being the only token estimation tool, and the description provides extra context about pricing, making the purpose unambiguous.

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 implicitly advises use for token estimation when text input is provided, and the model parameter guidance helps select the appropriate heuristic. However, it does not explicitly state when not to use it or mention alternatives, though no direct siblings exist.

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/davidmosiah/delx-mcp-server'

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