Pages: replace all
pages_replace_allReplace every occurrence of a text string throughout a .pages document body while preserving formatting, with an optional dry run to preview changes before writing.
Instructions
Replace every occurrence of find in a .pages body (needs Pages + GUI session). Rolled back if the readback disagrees. dry_run=true previews the change on a copy without touching the file. Use to change text everywhere while keeping formatting. To replace the whole body use pages_set_body; for template fields use pages_fill_placeholders.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| find | Yes | Text to find, exactly. | |
| path | Yes | Path to the .pages document (absolute, or starting with ~). | |
| dry_run | No | true = make the change on a throwaway copy, run every check, and return what would change; the file itself is not touched. Use it before broad or risky edits and show the user. | |
| replace | Yes | Replacement text. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||