replace_text
Replace text in a specific paragraph by its ID while preserving formatting. Supports DOCX, ODT, and Google Docs with tracked changes.
Instructions
Replace text in a paragraph by provider paragraph id, preserving formatting where supported. Supports DOCX, ODT, and Google Docs. Surface: revisionable — DOCX edits emit native OOXML tracked changes (w:ins/w:del/w:rPrChange).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | No | Path to the DOCX or ODT file. | |
| new_string | Yes | ||
| old_string | Yes | ||
| instruction | Yes | ||
| google_doc_id | No | Google Doc ID or URL (alternative to file_path). Extract from URL: docs.google.com/document/d/{ID}/edit | |
| normalize_first | No | Merge format-identical adjacent runs before searching. Useful when text is fragmented across runs. | |
| target_paragraph_id | Yes |