Skip to main content
Glama

Text statistics

text_stats
Read-onlyIdempotent

Count characters, bytes, words, lines, and sentences in a text input to analyze document length and composition.

Instructions

Count characters, bytes, words, lines and sentences in text. (Same as IT-Tools /text-statistics.)

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
textYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint and openWorldHint=false, so the safety profile is covered and this is evidently a pure computation. The description adds the useful detail that bytes are counted alongside characters, but says nothing about encoding assumptions, how sentences are delimited, or whether unicode/multi-byte text affects the byte count.

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 delivers the entire purpose with zero filler; the trailing parenthetical is short and mildly useful for users familiar with IT-Tools. Nothing is buried or repeated.

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 trivial single-parameter pure function with annotations covering safety and no output schema, enumerating the five computed metrics effectively communicates what comes back. The remaining gap is the exact return shape and edge-case behavior on empty or multi-byte input, which is minor at this complexity.

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 0%, so the description must carry the burden, and 'in text' only loosely indicates that the single 'text' parameter is the content to analyze. It does not state that the parameter is required or that it must be non-empty, adding only marginal meaning beyond the schema.

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?

States a specific verb ('Count') plus the exact metrics (characters, bytes, words, lines, sentences) over a specific resource (text), which is unambiguous and clearly distinct from siblings like case_convert or regex_test. It stops short of naming or contrasting a sibling explicitly, so it lands just under 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 Guidelines2/5

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

There is no when-to-use or when-not-to-use guidance, no mention of alternatives, and no preconditions. The parenthetical '(Same as IT-Tools /text-statistics.)' is a provenance note, not usage guidance, so the agent must infer that this is simply the tool to reach for whenever text metrics are wanted.

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