scoped_search_replace_execute
Execute targeted text replacements on specific LightCMS pages, such as those in a folder or category, after previewing changes. Optionally auto-republish updated pages.
Instructions
Execute a search-and-replace limited to a subset of pages. ALWAYS run scoped_search_replace_preview first and show results to the user before executing.
Scope options (all optional):
content_ids, folder_path, template_name, category
Set auto_republish: true to immediately re-publish all previously-published pages after updating them, collapsing the execute + publish_multiple flow into one call.
Example: {"search": "old text", "replace": "new text", "folder_path": "/blog", "auto_republish": true, "version_comment": "Updated old references"}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| auto_republish | No | If true (execute only), re-publish all previously-published pages immediately after updating them (saves a separate publish_multiple call) | |
| category | No | Limit to pages in this category | |
| content_ids | No | Limit to specific content IDs | |
| folder_path | No | Limit to pages whose URL starts with this path (e.g. /blog) | |
| regex | No | If true, treat search as a Go regular expression. Use $1, $2 for capture group references in replace. | |
| replace | Yes | Replacement text (empty string to delete) | |
| search | Yes | Text to search for,required | |
| template_name | No | Limit to pages using this template name (e.g. 'Concept Page') | |
| version_comment | No | Version comment for updated pages |