Skip to main content
Glama

Agent Data Hub

Text statistics: word count, tokens, readability, reading time

util_text_stats
Read-onlyIdempotent

Count words, characters (with/without spaces), sentences, paragraphs, lines and unique words in a text; estimate LLM tokens; reading and speaking time; Flesch reading ease + Flesch-Kincaid grade (English); top keywords without stop words. Unicode-aware. Use to check length limits (tweets, meta descriptions, essays), budget context windows, or judge how easy a text is to read. Price: $0.001 per call (USDC on Base via x402); the first 10 calls per day are free.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "text": "<text>"
    },
    "name": "util_text_stats"
  }
}

Input Schema

NameRequiredDescriptionDefault
topNoHow many top keywords to return, 0–50 (default 10)
textYesThe text to analyse (max 500,000 chars)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint, so the safety profile is covered. The description earns credit for non-obvious behavior the annotations cannot convey: Unicode awareness, the English-only limitation on Flesch metrics, stop-word filtering for keywords, and the pricing model ($0.001/call with 10 free calls per day on Base via x402). It stops short of describing the response shape, but the character cap is carried by the schema.

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?

It is one dense but well-ordered block: capabilities first, caveats (English, Unicode) next, use cases after, and the pricing note last. Every clause maps to a real feature or constraint, with no filler, though the semicolon-chained metric list is harder to scan than a short bulleted form would be.

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

Completeness4/5

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

For a two-parameter, no-output-schema tool, the description covers everything an agent needs to decide to call it: what is computed, language limits, Unicode handling, max input length (via schema), and cost. The only gap is that, absent an output schema, it does not indicate how results are structured or keyed.

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?

Schema description coverage is 100%, with both `text` (max 500,000 chars) and `top` (0–50, default 10) documented inline, so the baseline is 3. The description adds only indirect context by mentioning 'top keywords without stop words', which explains what `top` controls but not its range or default 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 opens with a precise verb-plus-resource statement ('Count words, characters (with/without spaces), sentences, paragraphs, lines and unique words') and enumerates the full metric set, including token estimation and readability scores. An agent can tell immediately this is an analysis-only text metrics tool, distinct from the parsing/formatting siblings like util_encode or util_regex.

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?

It gives three concrete use cases: checking length limits (tweets, meta descriptions, essays), budgeting context windows, and judging readability. That is clear positive guidance, but there are no explicit when-not conditions or named alternatives, and the sibling list contains no comparable stats tool to route against.

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