Skip to main content
Glama

royal-mcp__wp_update_custom_css

Destructive

Update the active theme's custom CSS (the whole stylesheet). CSS is filtered through wp_kses (script tags stripped). 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, 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.

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. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the destructive/openWorld/non-idempotent annotations: discloses kses filtering/script stripping, the full refusal-code list, field_dropped restore behavior, the 1 MB undo limit with undo_available false, and the Royally human-approval gate that defers all site changes. This is exactly the extra behavioral context annotations can't carry.

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 scope, then layers prerequisites, dry_run, and refusal codes efficiently. Dense but nearly every clause earns its place; the parenthetical site tag and approval note add slight bulk but are informative.

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?

With no output schema, the description still characterizes return behavior (dry_run preview fields, refusal codes, undo_available/undo_reason) and the approval-queue side effect, leaving nothing essential for a correct invocation unstated.

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% and the schema documents dry_run, site_id, theme_slug, and expected_sha256. The description adds real semantic meaning for dry_run (returns allowed/reason/sha256/byte counts, changes nothing) and expected_sha256 (refuses with expected_mismatch on drift), beyond the terse schema text; only css is left undocumented but is self-evident.

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 adds the crucial scope note that it replaces the whole stylesheet, distinguishing it from the read sibling wp_get_custom_css. An agent can tell exactly what this does.

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?

Explains prerequisites (admin toggle, unfiltered_html capability), the dry_run preview path, and the expected_sha256 concurrency guard ('sha256 of the CSS you read'), implying a read-first workflow. It doesn't explicitly name wp_get_custom_css as the read alternative, so not a full 5.

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