Skip to main content
Glama

IA-QA — 152 QA & Dev Tools for AI Agents

levenshtein_distance

Read-onlyIdempotent

Compute the Levenshtein (edit) distance and normalized similarity ratio between two strings. Supports batch comparison. Useful for fuzzy string matching, deduplication, and test result comparison.

Input Schema

NameRequiredDescriptionDefault
aNoFirst string (single-pair mode)
bNoSecond string (single-pair mode)
batchNoBatch of {a,b} pairs (max 50)
case_insensitiveNoIgnore case differences (default: false)

Output Schema

NameRequiredDescriptionDefault
aNo
bNo
modeNo
countNo
resultsNo
distanceNo
similarityNo
operations_neededNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "a": "kitten",
      +    "b": "sitting"
      +  }
      +]
  2. Changed1 schema field changed
    • addedOutput schema / properties
      Added value: +{
      +  "a": {},
      +  "b": {},
      +  "count": {
      +    "type": "number"
      +  },
      +  "distance": {},
      +  "mode": {
      +    "type": "string"
      +  },
      +  "operations_needed": {},
      +  "results": {},
      +  "similarity": {
      +    "type": "string"
      +  }
      +}
  3. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "type": "object"
      +}
  4. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, and closed-world, so the safety profile is covered. The description adds genuinely new behavior beyond that: batch comparison is supported and a normalized similarity ratio is returned alongside the raw distance. It stops short of stating any size or performance caveat for large strings.

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?

Three short sentences: capability first, then a behavioral note, then use cases. Front-loaded and waste-free, though the use-case sentence is the softest and borders on generic filler.

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 not be explained, and all four parameters are documented in the schema. The remaining gap is that no required parameters exist, yet the description never says which inputs to supply for single-pair versus batch mode, leaving a plausible mis-invocation path.

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%, including mode hints ("single-pair mode") and the batch cap of 50, so the baseline is 3. The description only reinforces the existence of batch mode and does not clarify the key ambiguity that zero parameters are required or how a/b interact with batch.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: computes Levenshtein edit distance plus a normalized similarity ratio, with batch support. It is clear what the tool does, but it never names or contrasts the closely-related siblings (similarity_score, diff_text, embedding_similarity, text_stats), so an agent cannot fully disambiguate on purpose alone.

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?

"Useful for fuzzy string matching, deduplication, and test result comparison" gives concrete when-to-use contexts. There are no when-not conditions and no mention of the alternative similarity/diff tools, so selection between siblings still relies on the agent's own knowledge.

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.