Skip to main content
Glama

Count Text Stats

count_text_stats
Read-only

Return word, character, sentence, and paragraph counts plus average words per sentence for a given text, for length checks and content sizing decisions.

Use when: Use when output length must be validated or reported — e.g. verifying a summary meets a length contract or comparing document sizes. Do not use for semantic summarization; it counts only.

Limitations: Pure counting on the provided text — no language detection, no reading-level or sentiment analysis, and no retrieval of external content.

Alternatives: web_search, http_fetch

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesText to summarize

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
word_countYes
sentence_countYes
character_countYes
paragraph_countYes
average_words_per_sentenceYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / text / title
      Added value: +"Text"
    • addedInput schema / title
      Added value: +"mcp_count_text_statsArguments"
  2. First observed

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already mark this as read-only, and the description adds useful behavioral limitations: pure counting, no language detection, no reading-level or sentiment analysis, and no external retrieval. It does not cover edge cases like empty text or error handling, but for a simple read-only counter with an output schema, the disclosure is adequate.

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 tightly structured with clear labeled sections: what it does, when to use it, limitations, and alternatives. Each sentence earns its place, and the most important purpose information is front-loaded.

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, read-only counting tool with one fully described parameter and an output schema, the description covers purpose, usage context, exclusions, and alternatives. Nothing needed to invoke it correctly is missing.

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

Parameters4/5

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

The single 'text' parameter is fully described in the schema at 100% coverage, giving a baseline of 3. The description adds value by correcting the schema's misleading 'Text to summarize' phrase, clarifying that the text is raw content to be counted rather than semantically summarized. No additional parameter-level syntax is needed for such a simple input.

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 specific verb and resource: it returns counts of words, characters, sentences, paragraphs, and average words per sentence. It clearly separates this from semantic work by stating it 'counts only', and it names alternatives, distinguishing itself from web_search and http_fetch.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The 'Use when' section gives concrete examples—validating a summary length contract or comparing document sizes—and explicitly says not to use it for semantic summarization. The limitation note that it does not retrieve external content reinforces when web_search or http_fetch would be better choices.

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