Skip to main content
Glama

Scoped Search Replace Preview

scoped_search_replace_preview
Read-only

Preview search-and-replace results across selected pages, folders, templates, or categories before applying changes, avoiding unintended site-wide edits.

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

Only live pages are searched: fork copies named in content_ids come back in "skipped" as {id, reason}.

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

Always run preview before execute.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
regexNoIf true, treat search as a Go regular expression. Use $1, $2 for capture group references in replace.
searchYesText to search for,required
replaceYesReplacement text (empty string to delete)
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)
template_nameNoLimit to pages using this template name (e.g. 'Concept Page')
auto_republishNoIf true (execute only), re-publish all previously-published pages immediately after updating them (saves a separate publish_multiple call)
version_commentNoVersion comment for updated pages

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv4.2.0

TDQS

A4.4/5.0
Behavior4/5

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

With readOnlyHint=true already declared, the description still adds real context: only live pages are searched and fork copies named in content_ids are returned in 'skipped' as {id, reason}, plus that auto_republish applies to execute only. This goes beyond the annotations, though it does not describe the preview output shape more fully.

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?

Front-loaded purpose sentence, then bulleted scope options, a caveat on skipped pages, and a compact example. Every line carries information; nothing is redundant padding.

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?

For a read-only preview with no output schema, the description covers scope, defaults, safety framing, and a key edge case (skipped forks). It could say more about what the preview response contains, but it is sufficient to invoke the tool correctly.

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 the baseline is 3, but the description adds the default semantics ('all optional — leave blank to match all pages') and illustrates each scope filter with concrete values, which the schema does not state. A worked example ties the parameters together usefully.

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 a specific verb (preview) and resource (search-and-replace) plus its distinguishing scope (limited to a subset of pages). It explicitly contrasts with site-wide replacement and ties itself to the execute sibling via 'Always run preview before execute', so an agent can place it without opening other schemas.

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?

'Safer than site-wide replacement' and 'Always run preview before execute' give clear when-to-use guidance and route to the execute step. It does not explicitly differentiate itself from the non-scoped search_replace_preview sibling, which is the one remaining ambiguity.

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

Deploy Server

Other Tools