compare_documents
Compare two DOCX or ODF documents to generate a tracked-changes output. Supports standalone file comparison or session edit comparison.
Instructions
Compare two documents and produce a tracked-changes output document. Provide original_file_path + revised_file_path for standalone comparison, or file_path to compare session edits against the original. DOCX and ODF (.odt) support both modes. DOCX stats count insertions/deletions as contiguous ranges, expose atom totals as insertedAtoms/deletedAtoms, and report formatChanges separately from modifiedParagraphs. ODF compares at inline granularity (a modified paragraph is marked up in place — only the changed spans are struck or inserted).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| original_file_path | No | Path to the original DOCX or .odt file. | |
| revised_file_path | No | Path to the revised DOCX or .odt file. | |
| file_path | No | Path to the DOCX or ODT file. | |
| save_to_local_path | Yes | Path to save the tracked-changes output (DOCX or .odt). | |
| author | No | Author name for track changes. Default: 'Comparison' (DOCX) or the configured AI author (ODF). | |
| engine | No | Comparison engine (DOCX only). Default: 'auto'. |