Skip to main content
Glama

Diff two texts

text_diff
Read-onlyIdempotent

Compare two texts word by word after Arabic normalisation (tashkeel, alef/ya/ta-marbuta and digit variants are treated as equal). Returns an equal flag, a similarity score and the added and removed words. Use it for deduplication, re-import checks and QA of edited Arabic copy. Each side is limited to 1500 words.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "a": "<a>",
      "b": "<b>"
    },
    "name": "text_diff"
  }
}

Input Schema

NameRequiredDescriptionDefault
aYesThe first text.
bYesThe second text.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare read-only/idempotent/non-destructive, and the description goes well beyond them: it discloses the normalisation semantics that change comparison results (tashkeel, alef/ya/ta-marbuta, digit variants), the exact return payload (equal flag, similarity score, added/removed words), and a hard 1500-word-per-side cap. That is the kind of behavioral detail an agent cannot infer from the schema or annotations.

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?

Three dense sentences: behaviour first, then return shape, then use cases and the size limit. No filler and nothing important buried at the end.

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?

There is no output schema, yet the description enumerates the returned fields (equal, similarity, added/removed words), which covers the gap. Combined with the normalisation rules and the size limit, an agent has everything needed to call it correctly.

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% but the schema only says 'The first text'/'The second text'; the description adds the materially useful constraint that each side is limited to 1500 words and that content is normalised before comparison. It does not clarify ordering effects or what happens on over-limit input, so it is not a 5.

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 precise verb and resource ('Compare two texts word by word') and immediately qualifies it with the Arabic normalisation rules, which distinguishes it from generic siblings like text_normalize or text_search. An agent can tell exactly what this does and on what data.

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?

Names concrete use cases (deduplication, re-import checks, QA of edited Arabic copy), which is solid contextual guidance. It stops short of explicit when-not-to-use or naming an alternative sibling (e.g. text_normalize for canonicalising rather than comparing), so it earns a 4 rather than 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.