Skip to main content
Glama

damerau_distance

Calculate the Damerau-Levenshtein distance between two strings to measure edits including transpositions, helping compare text similarity and detect typos.

Instructions

Calculate Damerau-Levenshtein distance (edits + transpositions) between two strings.

Input Schema

NameRequiredDescriptionDefault
text_aYesFirst string.
text_bYesSecond string.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.11

TDQS

B3.3/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It doesn't state the return format (integer edit count?), whether it's case-sensitive, or whether the metric is symmetric. Only the algorithm variant is disclosed.

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

Conciseness5/5

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

A single tight sentence with the key differentiator (transpositions) front-loaded. No filler.

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

Completeness3/5

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

A simple 2-param pure function needs little behavior detail, and the schema covers inputs. But with no output schema and no annotations, the description should at least say what the result is (an integer distance), which it leaves implicit.

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% with two trivially documented string parameters, so per the calibration rule the baseline is 3. The description adds no syntax, ordering, or format notes 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 verb and resource: 'Calculate Damerau-Levenshtein distance'. It even disambiguates from the plain Levenshtein variant via the parenthetical '(edits + transpositions)', which cleanly separates it from the sibling 'edit_distance'.

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

Usage Guidelines2/5

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

The description says what it computes but gives no guidance on when to prefer it over edit_distance or string_distance, nor any constraints (e.g. string length limits, performance). With three near-identical distance siblings, the agent gets no routing help.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools