Skip to main content
Glama

Word, character, sentence and token counts

text_stats
Read-onlyIdempotent

Count characters, words, sentences, paragraphs and lines, estimate LLM tokens and reading time, and compute a Flesch reading-ease score.

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
textYesText

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and openWorldHint=false, so the safety profile is fully covered and the description correctly does not contradict it. The description adds the set of computed metrics but says nothing beyond that: no tokenizer/model assumption behind the LLM token estimate, no reading-speed assumption, and no note that the Flesch score presupposes English text. Useful enumeration, limited behavioral depth.

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?

One front-loaded sentence that enumerates capabilities without filler or repetition. Every clause names a distinct output, so nothing is wasted, though the list-style phrasing is dense rather than structured.

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

Completeness3/5

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

For a simple single-input computation tool with annotations and a trivial schema, this is nearly adequate, but there is no output schema, so the description is the only hint at return values and it does not say they come back as one stats object. It also omits the language precondition for Flesch scoring and the tokenizer behind the token estimate.

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 a single required parameter whose schema description is only 'Text', and the tool-level description adds no constraint, size limit, or format guidance about it. With schema coverage at 100% the structured fields nominally carry the parameter, so the baseline of 3 applies, but neither source clarifies what kind of text is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses specific verbs (count, estimate, compute) and enumerates the exact resources produced: characters, words, sentences, paragraphs, lines, LLM tokens, reading time, and Flesch reading-ease. This is unambiguous and clearly not a diff/transform/slugify tool. It does not name any sibling or state what it is not, which keeps it short of a 5.

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?

There is no explicit when-to-use or when-not-to-use statement, and no alternatives are named. Usage is only implied by the enumerated metrics — an agent can infer 'call this when you need text statistics' but must reason it out rather than read 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