Skip to main content
Glama

royal-mcp__wp_replace_in_page

Destructive

Find/replace a literal string inside a page's content without resending the full body. Page-typed variant of wp_replace_in_post — same semantics: case-sensitive literal match, all occurrences replaced, dry_run preview, expected_count guard, read-after-write verification. (site: demo.royalplugins.com) Through Royally: waits for a person to approve it in Royally; nothing on the site changes until then.

Input Schema

NameRequiredDescriptionDefault
idYes
findYesLiteral text to find in the page content (case-sensitive, no regex).
dry_runNoReport the occurrence count without writing. Default false.
replaceYesLiteral replacement text. Empty string deletes the matched text.
site_idNoSite to run this tool on: 8ef2e52b-bd07-4671-a363-ebe8b480b65c (https://demo.royalplugins.com)
expected_countNoOptional guard: abort without writing unless the number of occurrences equals this value.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Goes well beyond the destructiveHint/readOnlyHint annotations: it discloses case-sensitive literal matching with no regex, all-occurrences replacement, the expected_count abort guard, read-after-write verification, and critically the Royally approval gate where nothing changes on the site until a person approves. That approval workflow is behavior an agent cannot get from annotations alone.

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?

Front-loads the core action in the first clause, then parenthetically layers semantics and the approval caveat. Dense but each clause carries information; the '(site: ...)' inline note is slightly noisy but minor.

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?

Covers mechanism, safety guards, and the human-approval gate for a 6-parameter mutation tool with no output schema. What's missing is any indication of what the tool returns (occurrence counts, diff, approval status), which the agent would need since there is no output schema to fall back on.

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 already 83%, with find, replace, dry_run, expected_count and site_id all documented. The description restates dry_run preview and expected_count guard rather than adding syntax or edge-case detail (e.g. what happens on zero matches), so baseline 3 applies.

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 (find/replace) and resource (a page's content), plus the key efficiency claim 'without resending the full body'. It explicitly positions itself as the page-typed variant of wp_replace_in_post, so an agent can distinguish it from that sibling and from wp_replace_text_in_blocks.

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?

The 'page-typed variant of wp_replace_in_post — same semantics' line routes the agent toward the post tool for posts and this one for pages, and mentions dry_run preview as the safe pre-check. It stops short of explicitly naming the when-not cases (e.g. block-level edits vs. content edits), leaving some inference.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources