replace_text
Find and replace text in a paragraph, optionally marking changes with strikethrough and underline for review, or apply immediately.
Instructions
Replace text in a paragraph.
With tracked=True (default) the old text is shown as red strikethrough and the new text as an underlined insertion — the human reviewer accepts/rejects in Word. Only the actually-changed portion is marked; common leading/trailing text is left as plain runs. With tracked=False the replacement is applied immediately without any visible markup.
Args: para_id: paraId of the target paragraph. find: Text to find and replace (may span run boundaries). replace: Replacement text. author: Author name shown in Word's review pane (tracked=True only). context_before: Text immediately before the target (for precise anchoring). context_after: Text immediately after the target (for precise anchoring). tracked: True (default) = strikethrough + underline the human accepts/rejects. False = replaced immediately, no markup. document_handle: Optional handle for concurrent session isolation.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| para_id | Yes | ||
| find | Yes | ||
| replace | Yes | ||
| author | No | Claude | |
| context_before | No | ||
| context_after | No | ||
| ignore_case | No | ||
| tracked | No | ||
| document_handle | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |