replace_text
Find and replace text in .docx documents for template substitution, such as updating placeholders like {{CLIENT_NAME}} with actual values.
Instructions
Find and replace text in an existing .docx document. Useful for template substitution — e.g., replacing {{CLIENT_NAME}} with an actual name, or updating dates and contract values.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filePath | Yes | Path to the .docx file to modify | |
| find | Yes | Text string to search for | |
| replace | Yes | Replacement text (can be empty string to delete the found text) | |
| replaceAll | No | If true (default), replace every occurrence. If false, replace only the first occurrence. |