delete_text
Remove targeted text from a Word paragraph, with support for precise anchoring and optional tracked changes for review.
Instructions
Delete text from a paragraph.
Finds the text within the paragraph (across run boundaries if needed). With tracked=True (default) the deleted text stays visible as red strikethrough in Word's Track Changes view — the human reviewer must accept the deletion to remove it permanently. With tracked=False the text is removed immediately.
Provide context_before/context_after to disambiguate when the same text appears multiple times, or when it contains smart quotes / special whitespace.
Args: para_id: paraId of the target paragraph. text: Text to delete (ASCII quotes/dashes/spaces match their Unicode equivalents). 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). ignore_case: If True, match text and context case-insensitively. tracked: True (default) = red strikethrough the human accepts/rejects. False = text removed immediately, no markup. document_handle: Optional handle for concurrent session isolation.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| para_id | Yes | ||
| text | 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 |