Skip to main content
Glama

Frecuencia de caracteres

char-frequency
Read-onlyIdempotent

Cuenta la frecuencia de cada carácter. Cuándo: hay que transformar, comparar o medir un texto con exactitud y no por aproximación. No para: contar la frecuencia de palabras en un texto (word-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 how often each grapheme appears, sorted by frequency then by first appearance; optional case folding and whitespace exclusion. When: text has to be transformed, compared or measured exactly instead of approximated. Not for: counting word frequencies in text (word-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
topNoReturn top N (integer; optional; default 50; min 1; max 1000).
textYesInput text (string; required).
case_insensitiveNoFold case (boolean; optional; default false).
ignore_whitespaceNoIgnore whitespace (boolean; optional; default true).

Output Schema

NameRequiredDescriptionDefault
topNo
distinctNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / text / examples
      Added value: +[
      +  "hello"
      +]
  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 carry readOnly/idempotent/non-destructive/closed-world, and the description adds real value beyond them: determinism, no stored state, and concrete execution limits (time, result size). Minor flaw: it states a 64 KB input cap while the schema allows maxLength 262144, which could cause an agent to truncate valid 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?

Purpose is correctly front-loaded in the first sentence. However, the entire body is duplicated verbatim in Spanish and English, so roughly half the tokens repeat already-stated content, and the generic "When" sentence is the least informative part of that duplication.

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?

An output schema exists, so return values need no explanation; the description covers purpose, exclusion, determinism, and execution limits for a 4-parameter tool. The one real gap is the size-limit conflict with the schema, which leaves the true input ceiling ambiguous.

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 the baseline is 3; the description earns an extra point by explaining the tie-break ordering (frequency, then first appearance) and the intent of case folding and whitespace exclusion, which the terse schema entries do not. The `top` parameter is left to the schema.

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 and resource ("Counts how often each grapheme appears") plus output ordering and the two optional modifiers. It also names the sibling it is not (word-frequency), so an agent can discriminate it 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 Guidelines4/5

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

It has an explicit "When" clause and an explicit "Not for" clause that names the alternative (word-frequency). The "when" wording is abstract ("transform, compare or measure exactly instead of approximated") rather than naming concrete triggers like 'compute character histogram', so it stops short of a 5.

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