Skip to main content
Glama

Server Details

Count tokens (o200k/cl100k), truncate to a budget, chunk text for RAG and estimate LLM cost.

Ownership verified
Status
Healthy
Uptime
100.0% over the last 24 hours
Last Tested
Transport
Streamable HTTP · MCP 2025-11-25
URL
ChatGPT
–
Claude
–

TDQS

A4/5.0

Scored across 4 tools

Disambiguation5/5

Each tool has a clearly distinct operation: counting tokens, chunking text, truncating to a token budget, and estimating cost. Although chunk_text and truncate_to_budget both operate on token-bounded text, their outputs and use cases are clearly separated. count_tokens and estimate_cost are also distinct: one measures tokens, the other estimates USD cost.

Naming Consistency5/5

All four tool names follow a consistent snake_case verb_noun pattern: chunk_text, count_tokens, estimate_cost, truncate_to_budget. There are no mixed conventions or vague names. The naming is predictable and easy for an agent to scan.

Tool Count5/5

Four tools is well-scoped for a token utility server focused on counting, chunking, truncating, and cost estimation. Each tool earns its place without obvious redundancy. The surface is neither thin nor bloated.

Completeness4/5

The server covers the core token-management workflow: count tokens, split text, truncate to a budget, and estimate cost. Minor gaps exist, such as no direct way to list supported models/encodings or inspect the dated price table independently. Agents can still accomplish the main tasks through the provided tools.

Available Tools

4 tools
chunk_textChunk text for RAGA
Read-onlyIdempotent
Inspect

Split text into token-bounded chunks on paragraph/sentence boundaries with character offsets, token counts and optional overlap.

Inputs: text (required), model, encoding, chunk_tokens, +1 more.

count_tokensCount tokensA
Read-onlyIdempotent
Inspect

Count tokens for text in o200k_base and cl100k_base side by side, plus approximate Claude/Gemini/Llama counts with method notes. OpenAI counts (o200k_base, cl100k_base) are exact for those tokenizers. Claude, Gemini and Llama counts are APPROXIMATE (proxy encoding; real tokenizers differ, often by 10-20%, and newer Claude tokenizers by ~30% or more). Cost estimates use a dated price table (prices_as_of 2026-10-27) and are estimates, not live billing. Stateless: text is not stored or logged; no URL fetching. Max input is 256 KB. A single unbroken run of characters near that cap may hit a CPU timeout (503); normal text at the cap is supported.

Inputs: text (required).

estimate_costEstimate LLM costA
Read-onlyIdempotent
Inspect

Estimate USD cost per model from text or input_tokens plus output_tokens using a dated price table (prices_as_of 2026-10-27). Estimates, not live billing.

Inputs: text, models, input_tokens, output_tokens.

truncate_to_budgetTruncate to token budgetA
Read-onlyIdempotent
Inspect

Truncate text to max_tokens (keep start or end) for an encoding or model.

Inputs: text (required), max_tokens (required), keep, model, +1 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    Try in Browser

    Glama MCP Gateway

    Add one secure layer between your agents and this server.

    Resources