edit_docx
Replace exact text in a Word .docx even where it spans formatting runs, writing a new outputPath (the original is kept). oldText must occur expectedOccurrences times (default 1). part: body (default), header, footer or all. mode xml replaces XML copied from read_file docxMode xml. Images, fields and untouched parts are preserved; signed files are refused.
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": {
"inputPath": "<inputPath>",
"outputPath": "<outputPath>",
"oldText": "<oldText>",
"newText": "<newText>"
},
"name": "edit_docx"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | text | |
| part | No | ||
| newText | Yes | ||
| oldText | Yes | ||
| deviceId | No | Computer name or id from list_devices. Optional with one computer online or a default set. | |
| inputPath | Yes | ||
| outputPath | Yes | ||
| workSessionId | No | Work session from create_work_session. Pass the same ID on every call in this conversation; omit for legacy unscoped work. | |
| expectedOccurrences | No | ||
| includeHeadersFooters | No |