Skip to main content
Glama

Search Replace Preview

search_replace_preview
Read-only

Preview site-wide text replacements before applying changes. Shows affected pages, match counts, and field breakdowns to verify modifications.

Instructions

Preview a site-wide search-and-replace without making any changes. ALWAYS run this before search_replace_execute.

Returns: affected page count, total match count, and per-page field breakdown. For targeted replacements (a folder, template, or category), use scoped_search_replace_preview instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
regexNoIf true, treat search as a Go regular expression. Use $1, $2 for capture group references in replace.
replaceYesText to replace with,required
searchYesText to search for,required
Behavior4/5

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

Annotations declare readOnlyHint=true; the description reinforces this ('without making any changes') and adds necessary return value details ('affected page count, total match count, and per-page field breakdown') to compensate for the missing output schema. Could mention regex flavor or performance characteristics for a 5.

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?

Three sentences with zero waste: sentence 1 establishes purpose and critical workflow rule, sentence 2 documents return values, sentence 3 provides scoping guidance. Perfectly front-loaded.

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

Completeness5/5

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

Excellent completeness for a complex operation. Compensates for missing output schema by documenting return values, establishes the preview→execute safety pattern, and maps the sibling tool ecosystem (scoped vs site-wide, preview vs execute).

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

Parameters3/5

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

Schema description coverage is 100%, clearly documenting all three parameters (search, replace, regex). The description does not add semantic details beyond the schema, meeting the baseline expectation.

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?

The description clearly states the specific action ('Preview a site-wide search-and-replace') and explicitly distinguishes from siblings by naming both 'search_replace_execute' (workflow predecessor) and 'scoped_search_replace_preview' (scope alternative).

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?

Contains explicit workflow guidance ('ALWAYS run this before search_replace_execute') and clear alternative selection criteria ('For targeted replacements... use scoped_search_replace_preview 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