Skip to main content
Glama

text_stats

Read-only

Text statistics and word frequency (offline) — Full offline statistics for any text up to 100,000 characters: characters, words, unique words, sentences, paragraphs, lines, questions, numbers, URLs, emails, hashtags, mentions; averages (word length, words per sentence); vocabulary (lexical diversity, hapax words, long-word and capital-letter share); reading and speaking time; longest sentence; top words with density, top repeated 2- and 3-word phrases; and flags (long sentences, shouting, repetition, keyword stuffing). Optional top (1-50, default 15). For grade-level scores use /v1/text/readability. Price: $0.001 USDC (Base, via x402).

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": "text_stats"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYese.g. Coffee is the most popular drink in the office. We drink coffee every morning. Good coffee makes a good morning, and cold coffee makes a long day.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the safety profile is covered; the description still adds real context the annotations lack: the 100,000-character input limit and the $0.001 USDC x402 payment requirement. However it says nothing about error behavior for over-limit input or how billing interacts with failures, and 'offline' sits oddly against openWorldHint=true.

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?

Front-loaded with the core purpose, then a dense semicolon-delimited metric list that is long but earns its space because there is no output schema. The trailing price and cross-reference sentences are short and purposeful; the only waste is the `top` mention that does not correspond to a real parameter.

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?

With no output schema, the description carries the burden of telling the agent what comes back, and it does so thoroughly (metrics, averages, vocabulary, n-grams, flags). The remaining gaps are the phantom `top` parameter and no statement of behavior on inputs exceeding 100,000 characters.

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 coverage is 100% for the single `text` property, so the baseline is 3, and the description does not add syntax or format guidance beyond the example already in the schema. Notably it documents an 'Optional top (1-50, default 15)' parameter that does not appear in the input schema at all, which is a mismatch rather than added meaning.

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?

States a specific resource ('Full offline statistics for any text') and then enumerates exactly which metrics are computed (characters, words, sentences, readability proxies, n-grams, flags). This lets an agent distinguish it from text_readability and text_summarize without opening any schema.

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?

Explicitly routes grade-level scoring to /v1/text/readability, which is a genuine when-to-use-else signal. It also implies scope via the 100,000-character cap and 'offline' framing, but gives no explicit exclusion for the many sibling text tools (text_keyphrases, text_similarity) that overlap with its n-gram output.

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