apply_changes_from_file
Apply changes from a JSON file to a .docx document as tracked changes with comments, enabling large or reusable change sets.
Instructions
Same as apply_changes but reads the change list from a JSON file.
Useful for large change sets that would exceed token limits in a direct tool call, or for reusing a change set across multiple runs.
The JSON file must contain either a bare array of change objects, or an
object with a "changes" key::
[
{"fragment_id": 1, "change_type": "modify", "new_text": "..."},
{"cell_id": "2.1.1", "change_type": "modify_cell", "new_text": "..."}
]See apply_changes for change object schema and rules.
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": {
"document_path": "<document_path>",
"changes_file": "<changes_file>"
},
"name": "apply_changes_from_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| author | No | Author name for tracked changes and comments. Defaults to "AI Review". | AI Review |
| output_path | No | Where to save the redlined document. Defaults to ``<stem>_redlined.docx`` beside the input file. | |
| changes_file | Yes | Absolute path to the JSON file containing changes. | |
| document_path | Yes | Absolute path to the input .docx file. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |