Skip to main content
Glama

diff_contract_versions

Read-onlyIdempotent

Compare baseline and counterparty contract drafts to isolate stealth numeric, percentage, date, obligation-flip, and hidden-Unicode changes.

Instructions

Runs Myers O(ND) paragraph alignment and inline token/CJK diff between baseline and counterparty contract drafts, isolating stealth numeric, percentage, date, obligation-flip, and hidden-Unicode mutations.

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": {
      "baselineText": "<baselineText>",
      "candidateText": "<candidateText>"
    },
    "name": "diff_contract_versions"
  }
}

Input Schema

NameRequiredDescriptionDefault
baselineTextYesAgreed baseline contract, SLA, or policy text (v1).
candidateTextYesCounterparty returned or updated draft text (v2) to compare against baseline.
contractTitleNoOptional human-readable document label included in the diff report.
onlyChangedClausesNoWhen true, omits unchanged clauses without spoofs from the returned rows array.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and closed-world scope, so safety is covered. The description adds real context by naming the alignment algorithm and the mutation categories detected, and it references a 'returned rows array' and 'diff report', but it never describes the response shape, volume, or performance limits of the O(ND) approach.

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?

A single dense sentence front-loads the operation and then lists the detection targets; nothing is redundant. It is jargon-heavy ('Myers O(ND)', 'CJK') but that terminology is informative rather than 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?

With no output schema, the description carries the return-value burden, and it does partially: it mentions isolated mutations, a diff report, and a rows array. A fuller account of the report structure would be needed for a 5, but the essentials for correct invocation are present.

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 each parameter is already documented in the schema, including the onlyChangedClauses semantics. The description adds no further parameter meaning, so the baseline 3 applies.

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?

The description states a specific verb ('Runs ... diff') and resource ('between baseline and counterparty contract drafts'), and enumerates the mutation classes it isolates. It does not explicitly differentiate itself from the sibling detect_unicode_spoofs, which overlaps with the 'hidden-Unicode mutations' claim, so it falls short of a 5.

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 only implied: the baseline-vs-counterparty framing tells an agent this is a comparison tool, but there is no explicit when-to-use, when-not-to-use, or routing guidance relative to siblings like detect_unicode_spoofs or scan_contract_risk_signals.

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