Skip to main content
Glama

Similitud de Sørensen-Dice

dice-similarity
Read-onlyIdempotent

Calcula el coeficiente de Sørensen-Dice sobre bigramas de caracteres (0-1). Cuándo: hay que transformar, comparar o medir un texto con exactitud y no por aproximación. No para: calcular la similitud Jaro y Jaro-Winkler (jaro-winkler). 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: Computes the sørensen-Dice coefficient over character bigrams (0-1); robust for fuzzy matching of phrases and titles. When: text has to be transformed, compared or measured exactly instead of approximated. Not for: computing the Jaro and Jaro-Winkler similarity (jaro-winkler). 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
aYesFirst string (string; required; up to 20000 chars).
bYesSecond string (string; required; up to 20000 chars).
case_sensitiveNoCase sensitive (boolean; optional; default false).

Output Schema

NameRequiredDescriptionDefault
similarityNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / a / examples
      Added value: +[
      +  "night"
      +]
    • addedInput schema / properties / b / examples
      Added value: +[
      +  "nacht"
      +]
  2. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Adds concrete operational context beyond the annotations: no network access, no stored state, determinism, and hard limits of 64 KB JSON input, 1 s per call and 1 MB result — none of which appear in the annotations. The read-only and deterministic claims partly restate readOnlyHint/idempotentHint, which keeps it from a 5.

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?

Front-loaded with the core definition, then labeled sections for when/not-for/side effects/determinism/limits, so an agent can scan it quickly. The full Spanish and English duplication makes it roughly twice as long as necessary for a single 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?

With an output schema present, return values need no explanation, and the description covers the algorithm basis, exclusion, side effects and resource limits. The one remaining gap is guidance on how this metric compares to other string-similarity siblings beyond jaro-winkler, which matters given the dense sibling set.

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 100%, so a, b and case_sensitive are already documented with types, maxLength and default, making 3 the baseline. The description adds only the algorithmic framing (character bigrams) that contextualizes what a and b are compared on, but gives no per-parameter guidance beyond 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 algorithm and resource — the Sørensen-Dice coefficient over character bigrams, with an explicit 0-1 output range — and explicitly names the sibling (jaro-winkler) that computes a different similarity. An agent can distinguish this from jaro-winkler or levenshtein-distance without opening the 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' and a 'No para' that names the alternative jaro-winkler, which is exactly the routing signal an agent needs. The positive 'when' clause, however, is generic ('transformar, comparar o medir un texto') and does not distinguish this from other similarity siblings such as levenshtein-distance, damerau-levenshtein, soundex or vector-similarity.

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