Skip to main content
Glama

royal-mcp__wp_update_widget

Destructive

Update a widget instance by ID. Requires the "Allow AI to modify theme appearance" admin toggle AND edit_theme_options capability. Uses WordPress core /wp/v2/widgets so classic and block widgets are handled uniformly. Pass the id returned by wp_get_widgets. Response includes a 7-day undo token that restores the prior widget instance via mcp_undo_last_operation. Backslashes (JSON unicode escapes, embedded JSON-LD, Divi loop field bindings) are stored as sent. (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
idYesWidget ID (e.g. text-2, block-15)
sidebarNoSidebar ID to place the widget in (omit to leave unchanged)
site_idNoSite to run this tool on: 8ef2e52b-bd07-4671-a363-ebe8b480b65c (https://demo.royalplugins.com)
instanceNoWidget instance data. For classic widgets, pass the settings as {raw: {…}} as wp_get_widgets returns them; Royal MCP encodes them for widgets that only take the encoded form.
form_dataNoSerialized form data (classic widgets alternative to instance)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior5/5

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

Beyond the destructiveHint=true / idempotentHint=false annotations, it discloses that the operation is queued through Royally and requires human approval before anything changes, that the response carries a 7-day undo token restorable via mcp_undo_last_operation, and that backslashes/JSON unicode escapes are stored literally. That is exactly the kind of write-path, reversibility and data-fidelity detail annotations cannot convey.

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?

The mutation and its prerequisite are front-loaded, followed by the undo/approval context. It is dense but nearly every sentence carries distinct information; the inline '(site: demo.royalplugins.com)' restates the site_id enum and is the one piece of avoidable clutter.

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?

With no output schema, the description usefully previews the response (undo token) and the approval gating, and it explains how classic vs block widgets are handled. The one remaining gap is that it doesn't describe error or rejection behavior in the approval flow.

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%, so id, sidebar, instance, form_data and site_id are already documented in the schema itself. The description adds only marginal parameter value (the backslash note is behavioral, not semantic), so the baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource ('Update a widget instance by ID'), which cleanly separates it from the read-side siblings such as wp_get_widgets and wp_list_widgets. It is clear about what is mutated, though it never contrasts itself with adjacent mutation tools like wp_update_theme_mod.

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?

It states the prerequisites ('Allow AI to modify theme appearance' admin toggle plus edit_theme_options) and tells the agent to pass the id returned by wp_get_widgets, which is actionable routing guidance. It stops short of explicit when-not-to-use conditions or naming an alternative mutation path.

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