word_replace_text
Find and replace text in Word documents across paragraphs and tables, with optional backup and replacement count control.
Instructions
Find and replace text across paragraphs and tables in a Word document.
Args:
file_path: Path to the Word document (.docx).
find_text: Text string to find.
replace_text: Replacement text string.
count: Maximum number of replacements (-1 for all occurrences).
backup: If True, create a backup of the original file before modifying.
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": {
"file_path": "<file_path>",
"find_text": "<find_text>",
"replace_text": "<replace_text>"
},
"name": "word_replace_text"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | No | ||
| backup | No | ||
| file_path | Yes | ||
| find_text | Yes | ||
| replace_text | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |