Skip to main content
Glama

Scoped Search Replace Preview

scoped_search_replace_preview
Read-only

Preview text replacements on specific pages before applying changes. Control scope by folder, template, category, or page IDs to avoid site-wide modifications.

Instructions

Preview a search-and-replace limited to a subset of pages. Safer than site-wide replacement.

Scope options (all optional — leave blank to match all pages):

  • content_ids: specific page IDs

  • folder_path: pages under /blog, /docs, etc.

  • template_name: pages using "Concept Page", "Blog Post", etc.

  • category: pages with a matching category

Example: {"search": "old text", "replace": "new text", "folder_path": "/blog"}

Always run preview before execute.

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?

Strong: Annotations declare readOnlyHint=true, and description adds valuable risk context ('Safer than site-wide replacement') and explains that scopes are optional ('leave blank to match all pages'). No contradictions with annotations.

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

Conciseness5/5

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

Excellent structure: Purpose front-loaded, scope options clearly bulleted, example provided, and workflow guidance included. Zero waste—every sentence earns its place.

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?

Thorough for a 9-parameter tool: Covers all scope dimensions, required fields implied by example, and workflow explained. Minor gap: could briefly describe preview output format since no output schema exists.

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?

High value despite 100% schema coverage: Groups scope parameters conceptually with clear semantic explanations (e.g., 'pages under /blog, /docs'), and provides concrete JSON example showing parameter interaction.

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?

Excellent: States specific action ('Preview a search-and-replace'), target resource ('subset of pages'), and distinguishes from siblings ('Safer than site-wide replacement' contrasts with search_replace_preview).

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

Usage Guidelines4/5

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

Good: Explicitly recommends workflow ('Always run preview before execute') and contrasts with site-wide alternatives. Could be improved by explicitly naming sibling tools (scoped_search_replace_execute, search_replace_preview) to use instead.

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