Scoped Search Replace Execute
scoped_search_replace_executeRun a scoped search-and-replace across selected LightCMS pages by content ID, folder, template, or category, then optionally republish the updated live 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.
Only live pages are changed: fork copies named in content_ids come back in "skipped" as {id, reason}.
Example: {"search": "old text", "replace": "new text", "folder_path": "/blog", "auto_republish": true, "version_comment": "Updated old references"}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| regex | No | If true, treat search as a Go regular expression. Use $1, $2 for capture group references in replace. | |
| search | Yes | Text to search for,required | |
| replace | Yes | Replacement text (empty string to delete) | |
| 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) | |
| template_name | No | Limit to pages using this template name (e.g. 'Concept Page') | |
| auto_republish | No | If true (execute only), re-publish all previously-published pages immediately after updating them (saves a separate publish_multiple call) | |
| version_comment | No | Version comment for updated pages |