Redline & Audit Two Document Versions
diff_documentsRuns 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
| Name | Required | Description | Default |
|---|---|---|---|
| revised | Yes | Revised/updated document text or Markdown to compare deterministically against original. | |
| original | Yes | Baseline/original document text or Markdown (e.g. RFP, SOW, specification, SLA, or policy v1). | |
| docxTitle | No | Optional document title stored in .docx Dublin Core package metadata. | |
| docxAuthor | No | Author attribution recorded on OpenXML <w:ins> and <w:del> Track Changes tags when includeDocxTrackChanges is true. | API Keg Redline Engine |
| changedHunksOnly | No | When true (default), omits 100% identical sections from hunks, criticMarkup, and htmlRedline so multi-page documents shrink by 90-98% in tokens. | |
| ignoreWhitespace | No | Normalize repeated inline whitespace when aligning paragraphs while preserving exact text inside word-level diffs. | |
| contextParagraphs | No | Number of surrounding unchanged paragraphs to include around each changed hunk (0-5). | |
| includeDocxTrackChanges | No | When true, generates a base64 OpenXML .docx archive containing native Microsoft Word Track Changes (<w:ins> and <w:del>/<w:delText>) for Accept/Reject review. |