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, undo token for the earlier content. (site: demo.royalplugins.com) Through Royally: waits for a person to approve it in Royally; nothing on the site changes until then.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "id": "<id>",
      "find": "<find>",
      "replace": "<replace>"
    },
    "name": "royal-mcp__wp_replace_in_page"
  }
}

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. Added
  2. Removed
  3. 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 annotations by disclosing the human-approval gate ('nothing on the site changes until then'), the read-after-write verification, and an undo token capturing the earlier content. These are exactly the non-obvious traits (delay, reversibility, mutation safety) an agent needs for a destructive write with destructiveHint=true.

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 and then layers the semantics compactly. The parenthetical site note duplicates the site_id enum description and the site host appears twice (also in the approval sentence), which is mild waste but not enough to hurt readability.

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 destructive 6-parameter mutation with no output schema, the definition covers the important ground: approval gating, count guards, verification, and undo. It stops short of describing what the agent receives on approval/rejection or what the undo token is used with, which leaves a small residual gap.

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 coverage is 83%, so the schema already documents find, replace, dry_run, expected_count and site_id. The description restates their semantics (case-sensitive literal match, all occurrences replaced, dry_run preview, expected_count guard) in a useful but largely non-additive way, so the baseline of 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+resource (find/replace a literal string inside a page's content) and immediately distinguishes itself from the sibling wp_replace_in_post by naming it as the post-typed counterpart, with block-level siblings implicitly excluded by the 'page content' scoping.

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 phrase 'Page-typed variant of wp_replace_in_post' gives a clear selection rule: use this for pages, that for posts. It does not explicitly say when NOT to use it (e.g., pair it with wp_replace_text_in_blocks or wp_replace_block when the target is a block), so it stops short of full when/when-not guidance.

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