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