docx.text_run_replace
Replace text in a specific run using paragraph, run, and text node indices for precise word-level editing in DOCX documents.
Instructions
Replace text in SPECIFIC run by coordinates (paragraph/run/textNode indices) - precise word-level editing
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": {
"docId": "<docId>",
"paragraphIndex": "<paragraphIndex>",
"runIndex": "<runIndex>",
"textNodeIndex": "<textNodeIndex>",
"newText": "<newText>"
},
"name": "docx.text_run_replace"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| docId | Yes | Document ID | |
| newText | Yes | New text to replace with | |
| runIndex | Yes | Run index within paragraph (0-based) | |
| textNodeIndex | Yes | Text node index within run (0-based) | |
| paragraphIndex | Yes | Paragraph index (0-based) |