insert_text
Insert text into a paragraph with optional tracked changes markup. Specify position by start, end, or substring, and use context for precise anchoring.
Instructions
Insert text into a paragraph.
By default (tracked=True) the insertion is marked as a proposed addition that appears underlined in Word's Track Changes view. The human reviewer must accept it in Word before it becomes permanent. Pass tracked=False to write the text directly with no revision markup.
Args: para_id: paraId of the target paragraph. text: Text to insert. position: Where to insert — "start", "end", or a substring to insert after. author: Author name shown in Word's review pane (tracked=True only). context_before: Text immediately before the insertion point (for precise anchoring). context_after: Text immediately after the insertion point (for precise anchoring). ignore_case: If True, match context_before/context_after case-insensitively. tracked: True (default) = revision markup the human accepts/rejects in Word. False = text written directly, no markup. document_handle: Optional handle for concurrent session isolation.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| para_id | Yes | ||
| text | Yes | ||
| position | No | end | |
| 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 |