Skip to main content
Glama

Frecuencia de palabras

word-frequency
Read-onlyIdempotent

Cuenta la frecuencia de palabras, con opción de excluir palabras vacías en inglés o español. Cuándo: hay que transformar, comparar o medir un texto con exactitud y no por aproximación. No para: contar la frecuencia de cada carácter (char-frequency). 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 word frequencies using Unicode word segmentation, case-folded, with optional minimum word length and English/Spanish stopword removal. When: text has to be transformed, compared or measured exactly instead of approximated. Not for: counting how often each grapheme appears, sorted by frequency then by first appearance (char-frequency). 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.

Input Schema

NameRequiredDescriptionDefault
topNoTop N (integer; optional; default 20; min 1; max 1000).
textYesText (string; required).
stopwordsNoStopword list to exclude (optional; one of: none, en, es; default "none").none
min_lengthNoMinimum word length (integer; optional; default 1; min 1; max 50).

Output Schema

NameRequiredDescriptionDefault
topNo
distinctNo
total_wordsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / text / examples
      Added value: +[
      +  "The cat and the hat. The end."
      +]
  2. 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 readOnly/idempotent/non-destructive/closed-world, yet the description adds genuinely new traits: no network, no stored state, determinism, and hard limits (64 KB input, 1 s per call, 1 MB result). One flaw: the stated 64 KB JSON limit sits uneasily against the schema's 1 MB text maxLength, which could mislead an agent sizing its input.

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?

Each language block is dense and front-loaded (purpose → when → not-for → effects → limits), but the entire content is duplicated verbatim in Spanish and English, roughly doubling length for no informational gain to a single-language reader.

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?

Return values are covered by the existing output schema, so the description only needs purpose, routing, and limits – all present, including determinism and no-side-effect guarantees. The only shortfall is the unresolved 64 KB vs 1 MB input-size inconsistency, which matters for a tool with a required bulk text parameter.

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?

Schema coverage is 100%, so baseline is 3, but the description adds semantics the schema does not: case-folding, Unicode segmentation rules, and that stopword lists are specifically English or Spanish. It does not explain 'top' ranking behavior (sorted by frequency, ties by first appearance) in the word-frequency section, so it stops short of a 5.

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 a specific verb+resource (counts word frequencies) plus the distinguishing mechanics: Unicode word segmentation, case-folding, optional min length, English/Spanish stopword removal. It explicitly names the sibling it is NOT (char-frequency), so an agent can separate the two without opening either schema.

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

Usage Guidelines4/5

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

Provides an explicit 'Cuándo'/'When' clause (exact measurement rather than approximation) and an explicit 'No para' pointing at char-frequency. The positive condition is somewhat abstract ('transform, compare or measure exactly'), so the routing value comes mostly from the exclusion rather than a concrete trigger.

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