Skip to main content
Glama

Highland Intel APIs

Token count estimate

token-count
Read-only

Estimated token counts for cl100k-like, o200k-like, Claude-like and Llama-like tokenizers plus a char/4 baseline. Deterministic estimates, not exact counts. Returns { estimates: { cl100k, o200k, claude, llama, char4 }, chars, bytes, pieces, method, exact: false } Price: 1 credit (1 credit = 1 CAD cent) per successful call; input that does not match the schema is rejected before billing.

Input Schema

NameRequiredDescriptionDefault
textYesText to count, up to 60,000 characters.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, but the description adds meaningful context beyond those fields: it is deterministic, not exact, returns a specific estimated shape, and bills 1 credit per successful call while rejecting schema-invalid input before billing.

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 front-loaded with purpose, then details the return shape and billing behavior. The return-field list is justified because no output schema exists, and no sentence is wasted.

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 simple one-parameter read-only tool, the description covers purpose, estimation nature, return shape, and billing behavior. With schema coverage complete and no output schema, an agent has enough information to invoke it correctly.

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

Parameters3/5

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

There is one parameter with 100% schema description coverage, so the schema already explains the text input and its length limits. The description does not add further semantics about the text parameter, which is appropriate but not value-adding beyond the baseline.

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 states a specific verb and resource: estimating token counts across cl100k-like, o200k-like, Claude-like, and Llama-like tokenizers plus a char/4 baseline. This is concrete enough to distinguish it from sibling tools such as text-stats or chunk-text.

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 description implies when to use it by noting that it returns deterministic estimates rather than exact counts, which helps an agent know it is for approximation. However, it does not explicitly name alternatives or state when not to use it.

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