compare_documents
Compare two DOCX files and generate a document showing tracked changes. Highlights differences at paragraph and word level.
Instructions
Diff two DOCX files and produce a tracked-change document.
Paragraph-level LCS diff:
Unchanged paragraphs copied verbatim.
Deleted paragraphs (in base, absent in revised) wrapped in w:del.
Inserted paragraphs (in revised, absent in base) wrapped in w:ins.
Modified paragraphs (1:1 replacement) get word-level del+ins inline.
The output is a valid DOCX readable in Word/LibreOffice showing the changes as tracked revisions.
Args: base_path: Path to the original DOCX. revised_path: Path to the revised DOCX. output_path: Destination path. Auto-generated if empty.
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": {
"base_path": "<base_path>",
"revised_path": "<revised_path>"
},
"name": "compare_documents"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| base_path | Yes | ||
| output_path | No | ||
| revised_path | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |