Skip to main content
Glama

Scoped Search Replace Execute

scoped_search_replace_execute
Destructive

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

TableJSON Schema
NameRequiredDescriptionDefault
auto_republishNoIf true (execute only), re-publish all previously-published pages immediately after updating them (saves a separate publish_multiple call)
categoryNoLimit to pages in this category
content_idsNoLimit to specific content IDs
folder_pathNoLimit to pages whose URL starts with this path (e.g. /blog)
regexNoIf true, treat search as a Go regular expression. Use $1, $2 for capture group references in replace.
replaceYesReplacement text (empty string to delete)
searchYesText to search for,required
template_nameNoLimit to pages using this template name (e.g. 'Concept Page')
version_commentNoVersion comment for updated pages
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations declare destructiveHint=true; description complements this with safety protocol (preview requirement) and explains side effects of auto_republish ('immediately re-publish all previously-published pages'). Could further clarify irreversibility implications, but covers key workflow behaviors well.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Well-structured with critical workflow constraint ('ALWAYS...') front-loaded. Efficient bullet-style scope listing. Example JSON is long but functional. No redundant repetition of schema details.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Comprehensive for a complex 9-parameter destructive operation: covers preview requirement, scoping logic, auto-republish shortcut, and provides valid example. No output schema exists, but description adequately explains the operation's behavioral contract.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% so baseline is 3. Description adds significant workflow context for 'auto_republish' (explaining it replaces a separate publish_multiple call) and provides a concrete JSON example showing parameter interaction. Scope options are listed but not semantically expanded beyond schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States specific verb ('Execute'), resource ('pages'), and scope ('limited to a subset'). Effectively distinguishes from sibling 'search_replace_execute' by emphasizing scoping, and from 'scoped_search_replace_preview' by identifying this as the execution step.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit prerequisite: 'ALWAYS run scoped_search_replace_preview first'. Explains workflow alternative (auto_republish 'collapsing the execute + publish_multiple flow into one call'), clearly mapping when to use the flag vs separate calls.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jonradoff/lightcms'

If you have feedback or need assistance with the MCP directory API, please join our Discord server