token_count
Approximate cl100k/o200k token counts for budget decisions. Price $0.004 via x402.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | ||
| encoding | No | cl100k |
Approximate cl100k/o200k token counts for budget decisions. Price $0.004 via x402.
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | ||
| encoding | No | cl100k |
Changes observed during successful MCP inspections.
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden and does disclose two valuable traits: results are approximate (not exact tokenizer output) and the call costs $0.004 via x402, which signals a paid/auth-gated operation. It still omits the return shape (single count vs per-encoding breakdown) and any limits, so it is only moderate coverage.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two short sentences with the core purpose front-loaded and the pricing caveat appended. Nothing is redundant, though the pricing detail is a secondary fact that could have followed the purpose clause more tightly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple two-param utility with no output schema, the description covers the essentials of what it does and what it costs. It is thin on the return value and on the input size limit, which an agent sizing a request would want to know.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
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 two undocumented params. It does clarify the supported encodings (cl100k/o200k), matching the encoding param's default, but says nothing about the required text param or its 400,000-character cap.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Names a specific verb (count) and resource (tokens) and pins the encodings to cl100k/o200k, which is more precise than the bare tool name. It is distinguishable from most siblings, though it does not explicitly contrast with the related token_risk tool.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
"For budget decisions" gives an implied use case, so an agent can infer this is a pre-flight cost/context estimate. However, there is no explicit when-to-use vs when-not guidance and no pointer to the sibling token_risk, which likely covers a related concern.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Add one secure layer between your agents and this server.