Skip to main content
Glama

API Keg — Document Redline & Table Diff

Redline & Audit Two Document Versions

diff_documents
Read-onlyIdempotent

Runs two-level Myers O(ND) section/paragraph and inline word-and-punctuation diffing across two document versions, returning sectionBreadcrumb-tagged hunks, CriticMarkup ({--old--}{++new++}), inline HTML (/), dedicated numericAndDateChanges alerts, and optional native .docx Track Changes. Pricing: $0.002 USD per document redline comparison (x402 instant micropayment). Pass ?dry_run=true on REST to validate schema free.

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": "<original>",
      "revised": "<revised>"
    },
    "name": "diff_documents"
  }
}

Input Schema

NameRequiredDescriptionDefault
revisedYesRevised/updated document text or Markdown to compare deterministically against original.
originalYesBaseline/original document text or Markdown (e.g. RFP, SOW, specification, SLA, or policy v1).
docxTitleNoOptional document title stored in .docx Dublin Core package metadata.
docxAuthorNoAuthor attribution recorded on OpenXML <w:ins> and <w:del> Track Changes tags when includeDocxTrackChanges is true.API Keg Redline Engine
changedHunksOnlyNoWhen true (default), omits 100% identical sections from hunks, criticMarkup, and htmlRedline so multi-page documents shrink by 90-98% in tokens.
ignoreWhitespaceNoNormalize repeated inline whitespace when aligning paragraphs while preserving exact text inside word-level diffs.
contextParagraphsNoNumber of surrounding unchanged paragraphs to include around each changed hunk (0-5).
includeDocxTrackChangesNoWhen true, generates a base64 OpenXML .docx archive containing native Microsoft Word Track Changes (<w:ins> and <w:del>/<w:delText>) for Accept/Reject review.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

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, and destructiveHint=false, so the safety profile is covered. The description adds genuinely useful non-schema context — per-call pricing ($0.002, x402 micropayment) and the token-shrinking effect of changedHunksOnly — though it omits size limits or failure behavior on oversized inputs.

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?

One densely front-loaded sentence names the algorithm and enumerates outputs, followed by two short sentences on pricing and validation. Slightly heavy in output-format enumeration, but no filler and the critical capability leads.

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 does it well by enumerating hunks, CriticMarkup, HTML redline, numeric/date alerts, and optional .docx Track Changes. For an 8-parameter tool it is nearly complete, missing only limits like the 900k character cap or cost implications for large docs.

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%, so every parameter is already documented, setting the baseline at 3. The prose adds no parameter-level detail beyond the schema; the dry_run mention refers to a REST query flag not present in this input schema.

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 (diff) and resource (two document versions) plus the algorithm (two-level Myers O(ND)) and the exact output shapes produced, so an agent knows precisely what it gets back. It does not name or differentiate itself from the sibling diff_tables, so it stops 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 context is implied by 'across two document versions' and the RFP/SOW/SLA examples in the schema, and it notes a REST ?dry_run=true validation path. There is no explicit when-to-use/when-not guidance or routing to diff_tables for tabular content.

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