Skip to main content
Glama

Estadísticas de texto

text-metrics
Read-onlyIdempotent

Cuenta caracteres, bytes, palabras, oraciones, líneas y párrafos, y estima el tiempo de lectura. Cuándo: hay que transformar, comparar o medir un texto con exactitud y no por aproximación. No para: calcular las métricas de legibilidad: LIX y RIX (readability-score). Efectos secundarios: ninguno (solo lectura, sin red, sin estado guardado). Determinista: la misma entrada da la misma salida. Límites: entrada JSON de hasta 64 KB, 1 s por llamada, resultado de hasta 1 MB.

EN: Counts characters (code points and graphemes), bytes, words, sentences, lines and paragraphs, using Unicode segmentation, plus an estimated reading time at 238 words per minute. When: text has to be transformed, compared or measured exactly instead of approximated. Not for: computing the language-agnostic LIX and RIX scores plus estimated Flesch Reading Ease (readability-score). Side effects: none (read-only, no network access, no stored state). [EN completo / full EN: inputSchema.description]

Input Schema

NameRequiredDescriptionDefault
textYesText (string; required).

Output Schema

NameRequiredDescriptionDefault
linesNo
wordsNo
graphemesNo
sentencesNo
bytes_utf8No
charactersNo
paragraphsNo
characters_no_spacesNo
reading_time_secondsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / text / examples
      Added value: +[
      +  "Hello world. How are you?\n\nFine!"
      +]
  2. Changed1 schema field changed
    • addedInput schema / description
      Added value: +"EN: Counts characters (code points and graphemes), bytes, words, sentences, lines and paragraphs, using Unicode segmentation, plus an estimated reading time at 238 words per minute. When: text has to be transformed, compared or measured exactly instead of approximated. Not for: computing the language-agnostic LIX and RIX scores plus estimated Flesch Reading Ease (readability-score). Side effects: none (read-only, no network access, no stored state). Deterministic: the same input gives the same output. Limits: JSON input up to 64 KB, 1 s per call, result up to 1 MB."
  3. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare read-only, idempotent, non-destructive, closed-world, but the description adds genuinely non-derivable facts: no network access, no stored state, determinism guarantee, 1 s per call, result up to 1 MB. It does not explain output shape, though an output schema exists, so this is appropriately scoped rather than exhaustive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core English content is front-loaded and dense, but the block is bilingual and the English section is truncated as '[EN completo / full EN: inputSchema.description]', which is wasted text that just redirects to a field already supplied. The 64 KB / 1 MB mismatch also adds noise rather than information.

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 one-parameter deterministic counting tool with full annotations and an output schema, the description covers purpose, exclusions, side effects, determinism and operational limits — nearly everything needed to call it correctly. The only gap is the conflicting input-size ceiling (64 KB vs schema's 1 MB), which could mislead an agent sizing its input.

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?

Single required parameter with 100% schema coverage, so the schema documents 'text' and carries constraints. The description adds counting semantics (Unicode graphemes vs code points) that affect what the string means, but says nothing parameter-specific. Notably, it states a 64 KB JSON input limit while the schema declares maxLength 1048576, leaving conflicting size ceilings.

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 specific verbs and the exact metrics produced (code points, graphemes, bytes, words, sentences, lines, paragraphs, reading time at 238 wpm), plus the Unicode segmentation algorithm. It explicitly distinguishes itself from readability-score, so an agent can pick between the two without opening a schema.

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?

Uses explicit 'When:' and 'Not for:' clauses, and names the alternative sibling (readability-score) with the reason it is different (LIX/RIX/Flesch scores). The selection condition is stated, not implied.

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