Skip to main content
Glama

Quitar textos casi duplicados

dedupe-similar
Read-onlyIdempotent

Agrupa textos casi duplicados (similitud Jaccard de trigramas ≥ umbral) entre hasta 2.000 elementos y conserva el primero. Cuándo: un flujo de agente necesita un resultado exacto y repetible para un paso auxiliar (tokens, costos, reintentos, fragmentos, ranking, limpieza de JSON). No para: eliminar líneas duplicadas conservando la primera aparición y el orden (lines-dedupe). 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: Groups near-duplicate strings (Jaccard similarity of character 3-grams ≥ threshold, accent- and case-insensitive) among up to 2,000 items, keeping the first of each group. When: an agent loop needs an exact, repeatable result for a bookkeeping step (tokens, costs, retries, chunking, ranking, JSON clean-up). [EN completo / full EN: inputSchema.description]

Input Schema

NameRequiredDescriptionDefault
itemsYesStrings (array of string; required; at least 1 items; up to 2000 items).
thresholdNoSimilarity threshold 0-1 (number; optional; default 0.8; min 0; max 1).

Output Schema

NameRequiredDescriptionDefault
groupsNo
uniqueNo
removedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / items / examples
      Added value: +[
      +  [
      +    "Envío gratis a Bogotá",
      +    "envio gratis a bogota!",
      +    "Pago contra entrega",
      +    "Envío gratis a Medellín"
      +  ]
      +]
  2. Changed1 schema field changed
    • addedInput schema / description
      Added value: +"EN: Groups near-duplicate strings (Jaccard similarity of character 3-grams ≥ threshold, accent- and case-insensitive) among up to 2,000 items, keeping the first of each group. When: an agent loop needs an exact, repeatable result for a bookkeeping step (tokens, costs, retries, chunking, ranking, JSON clean-up). Not for: removing duplicate lines keeping the first occurrence and original order (lines-dedupe). 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.7/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive/closed-world, and the description still adds real context: no side effects, no network, no stored state, full determinism, and hard limits (64 KB JSON input, 1 s per call, 1 MB result) that affect how an agent should batch calls. It also discloses the accent- and case-insensitive normalization that changes matching behavior.

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?

Well front-loaded with labeled When / Not for / Side effects / Deterministic / Limits sections, but the same content is presented in Spanish and English and then closed with a dangling pointer ('EN completo / full EN: inputSchema.description') that duplicates the schema description verbatim. That redundancy costs space without adding information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a two-parameter, non-destructive utility with an output schema, the description covers purpose, alternatives, side effects, determinism, and operational limits — everything an agent needs to invoke it correctly and size its input.

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, but the description goes beyond the schema by explaining what the threshold actually measures (Jaccard over character trigrams, accent- and case-insensitive) and that the first item of each group is preserved. It does not explain item-length tradeoffs or how equal-similarity ties are broken.

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 concrete verb and resource: groups near-duplicate strings using Jaccard similarity of character 3-grams above a threshold, keeping the first of each group, over up to 2,000 items. It also names the sibling it is not (lines-dedupe for exact duplicate lines preserving order), so an agent can discriminate 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 Guidelines5/5

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

Explicit 'When:' clause scopes it to exact, repeatable bookkeeping steps (tokens, costs, retries, chunking, ranking, JSON clean-up) and an explicit 'No para / Not for:' clause routes exact-line deduplication to lines-dedupe. Both the selection and the exclusion condition are stated.

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