Skip to main content
Glama

DraftCompare Legal Diff

Compare Drafts (Deterministic Word Redline)

compare_drafts
Read-onlyIdempotent

Produces an exact, deterministic word-level redline between an original text and a revised text (up to 8,000 chars each). Groups contiguous deletions and insertions into structured updates with surrounding context, risk tags, and a unified Markdown redline.

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": {
      "original_text": "<original_text>",
      "revised_text": "<revised_text>"
    },
    "name": "compare_drafts"
  }
}

Input Schema

NameRequiredDescriptionDefault
ignore_caseNoIgnore letter casing and diacritic differences when diffing (default: false).
max_changesNoMaximum number of structured change items to return (default: 50).
revised_textYesRevised contract or clause text (max 8,000 characters).
original_textYesOriginal contract or clause text (max 8,000 characters).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so safety is covered. The description adds real context beyond that: determinism, grouping of contiguous deletions/insertions into structured updates, risk tags, and a unified Markdown redline. It stops short of noting truncation behavior when max_changes is exceeded.

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 front-loaded sentence that names the operation and its key properties without redundant restatement of the title. Every clause — determinism, word-level, size cap, output shape — carries information.

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 no output schema, the description must characterize the return value, and it does: structured updates with surrounding context, risk tags, and a Markdown redline. Limits and the max-changes cap are stated. Only the behavior when changes exceed max_changes (truncation semantics) is left unaddressed.

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%, and every parameter including ignore_case and max_changes is documented in the schema. The description only restates the 8,000-character limit already present in the schema and adds no further meaning about the parameters, so the baseline 3 applies.

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 — 'Produces an exact, deterministic word-level redline between an original text and a revised text' — plus the scope (word-level, up to 8,000 chars each). This clearly distinguishes it from the audit_* siblings, which analyze a single text rather than diffing two.

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

Usage Guidelines3/5

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

Usage is implied by the required original_text/revised_text pair, so an agent can infer this is the diffing tool. However, there is no explicit when-to-use guidance, no mention of when a different tool (e.g., get_comparison_stats) would be preferable, and no prerequisites or excluded cases.

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