Skip to main content
Glama

royal-mcp__wp_update_custom_css

Destructive

Update the active theme's custom CSS (the whole stylesheet). CSS holding a closing style tag, in any spelling, is refused. Requires the "Allow AI to modify theme appearance" admin toggle and unfiltered_html capability. dry_run true returns allowed, the refusal reason, current_sha256 and byte counts, changing nothing. expected_sha256 (sha256 of the CSS you read) refuses with expected_mismatch when the CSS changed since. Refusal codes: insufficient_caps, unfiltered_html_required, theme_writes_off, css_closes_style, expected_mismatch, field_dropped (the CSS is put back). When the prior CSS is over the 1 MB undo limit the reply says undo_available false, undo_reason snapshot_too_large. (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": {
      "css": "<css>"
    },
    "name": "royal-mcp__wp_update_custom_css"
  }
}

Input Schema

NameRequiredDescriptionDefault
cssYes
dry_runNotrue previews (default false).
site_idNoSite to run this tool on: 8ef2e52b-bd07-4671-a363-ebe8b480b65c (https://demo.royalplugins.com)
theme_slugNoTheme slug (defaults to active theme)
expected_sha256Nosha256 (hex) of the current CSS as you read it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added
  2. Removed
  3. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Goes well beyond the annotations (destructive/non-idempotent), which only flag that this is a dangerous write. The description discloses the capability prerequisites (admin toggle plus unfiltered_html), enumerates refusal codes including field_dropped and expected_mismatch, explains the 1 MB undo snapshot limit with undo_available/undo_reason, and warns that nothing changes until a human approves via Royally. That is exactly the context an agent needs before a destructive call.

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 operation and its scope, then layers safety, credentials, and refusal semantics in a sensible order. It is dense and the refusal-code list reads as a run-on, but every clause carries operational information rather than repetition.

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 write with no output schema, the description covers prerequisites, preview payload, concurrency guarding, refusal outcomes, undo limits, and the approval gate. The main omission is what a successful (non-dry-run) response looks like — whether it returns a change/receipt id or undo token — but the risk profile is otherwise well covered.

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 80%, so the baseline is already 3, and the description adds real meaning on top: what dry_run returns (allowed, refusal reason, current_sha256, byte counts) and what expected_sha256 does (refuses with expected_mismatch when the CSS changed). theme_slug is left to the schema, which already documents the active-theme default.

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 and resource ('Update the active theme's custom CSS') and pins the scope explicitly as 'the whole stylesheet', which distinguishes it from the read counterpart wp_get_custom_css and from partial-edit tools. An agent can identify the operation and its blast radius without opening the schema.

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?

Gives concrete usage patterns: dry_run true to preview, and expected_sha256 as 'sha256 of the CSS you read', which implies the read-then-guarded-write workflow. It also warns CSS containing a closing style tag is refused in any spelling. It never explicitly names wp_get_custom_css as the companion read tool or states when to prefer theme_mods/global styles instead, so it stops short of full alternative routing.

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