Skip to main content
Glama

text_stats

Read-only

Count characters, words, sentences, lines, estimated tokens, and reading time in text or files, and flag mixed line endings, trailing spaces, and invisible characters.

Instructions

Count chars, words, sentences, lines, tokens (est.), reading time; flags mixed line endings, trailing spaces, invisible chars.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "text_stats"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNoor a file
textNo
localeNo
top_wordsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.2

TDQS

B3/5.0
Behavior3/5

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

readOnlyHint=true already declares the safety profile, so the description only needs to add operational context. It usefully discloses that token count is an estimate and that the tool reports lint-style findings, which annotations do not cover, but it says nothing about the path-vs-text input requirement, error behavior when neither is supplied, or how file reads are performed.

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?

A single dense sentence that front-loads the primary outputs and appends the lint flags, with no filler. It is telegraphic to the point of being terse, but every clause corresponds to a real capability.

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 tool with four parameters, zero required fields and no output schema, the description should clarify the path/text either-or and what top_words and locale do. It covers the metric set adequately but leaves the invocation contract ambiguous, which is the main risk given no output schema to fall back on.

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

Parameters2/5

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

Schema description coverage is only 25%, and the single documented parameter ('path' described as 'or a file') is cryptic rather than clarifying. The description never explains 'locale' (presumably affects word/sentence segmentation) or 'top_words' (presumably limits a frequency list), so half the parameters carry no meaning anywhere.

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 verb 'Count' is paired with an explicit list of resources (chars, words, sentences, lines, tokens, reading time) and a secondary lint behavior (mixed line endings, trailing spaces, invisible chars), so an agent knows exactly what the tool produces. It does not, however, differentiate itself from the sibling 'stats' or 'text_transform', leaving the boundary to inference.

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

Usage Guidelines2/5

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

The description gives no when-to-use context, no prerequisites, and names no alternative tool for related needs such as transforming text or getting generic statistics. The agent must guess that this is a text-metrics tool rather than a general stats tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.