replace_text
Replace specific text in DOCX or Google Docs paragraphs while maintaining original formatting. Use paragraph IDs and string matching to update content precisely.
Instructions
Replace text in a paragraph by bk* id, preserving formatting. Supports DOCX and Google Docs.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | No | Path to the DOCX 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. |