Skip to main content
Glama

royal-mcp__wp_update_option

Destructive

Update a WordPress option. Four gates in order: (1) manage_options capability on the caller; (2) master "Allow AI to write WordPress options" admin toggle enabled; (3) hard denylist (siteurl, home, admin_email, mailserver_*, upload_path, users_can_register, wp_user_roles, wp_capabilities, api_key/secret/_pass/key patterns, royal_mcp* namespace — permanent, cannot be filter-overridden); (4) write⊆readable invariant + writable allowlist (option must appear in both royal_mcp_readable_options AND royal_mcp_writable_options — plugin authors must opt into READS before opting into WRITES). Error text names which gate blocked. "Not in allowlist" is fixable by an administrator under Royal MCP Pro settings (Allowlisted plugin options) or via filter opt-in; "permanently denylisted" is not. Set dry_run=true to preview the change (current + proposed value, autoload state, size delta) without writing. Send either value (the whole new value) or operations (changes to parts of a value that holds named values or lists, l… 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": {
      "name": "<name>"
    },
    "name": "royal-mcp__wp_update_option"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYes
valueNoNew value (any JSON type). Full overwrite — read first, merge in your client, then write back. Leave out when sending operations.
dry_runNoPreview the write without persisting. Returns current/proposed value, autoload state, and size delta; with operations, the list of changes.
site_idNoSite to run this tool on: 8ef2e52b-bd07-4671-a363-ebe8b480b65c (https://demo.royalplugins.com)
operationsNoChanges to parts of the stored value, applied in order; if any one cannot be applied, none is. Each has op and path, and set / append also have value. path is a list of steps from the top of the value: a key (text), a position in a list (whole number, first item is 0), or a match such as {"id": 1234} that picks the one list item whose field has that value. Examples: {"op":"set","path":["last_run_finished"],"value":"2026-01-01"}; {"op":"append","path":["entries"],"value":{"id":7}}; {"op":"remove","path":["entries",{"id":1234}]}; {"op":"remove","path":["entries",0]}; {"op":"set","path":["entries",{"id":5678},"reason"],"value":"fixed"}.
expected_sha256Nosha256 from wp_get_option or wp_get_plugin_settings for an option returned as stored. Required for a whole value, and for operations that set parts an earlier masked read hid, of an option returned as stored; refused with expected_mismatch when the option changed since.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / expected_sha256
      Added value: +{
      +  "description": "sha256 from wp_get_option or wp_get_plugin_settings for an option returned as stored. Required for a whole value, and for operations that set parts an earlier masked read hid, of an option returned as stored; refused with expected_mismatch when the option changed since.",
      +  "type": "string"
      +}
    • changedInput schema / properties / operations / description
      Previous value: -"Changes to parts of the stored value, applied in order; if any one cannot be applied, none is. Each has op and path, and set / append also have value. path is a list of steps from the top of the value: a key (text), a position in a list (whole number, first item is 0), or a match such as {\"id\": 55784} that picks the one list item whose field has that value. Examples: {\"op\":\"set\",\"path\":[\"last_run_finished\"],\"value\":\"2026-01-01\"}; {\"op\":\"append\",\"path\":[\"entries\"],\"value\":{\"id\":7}}; {\"op\":\"remove\",\"path\":[\"entries\",{\"id\":55784}]}; {\"op\":\"remove\",\"path\":[\"entries\",0]}; {\"op\":\"set\",\"path\":[\"entries\",{\"id\":57654},\"reason\"],\"value\":\"fixed\"}."New value: +"Changes to parts of the stored value, applied in order; if any one cannot be applied, none is. Each has op and path, and set / append also have value. path is a list of steps from the top of the value: a key (text), a position in a list (whole number, first item is 0), or a match such as {\"id\": 1234} that picks the one list item whose field has that value. Examples: {\"op\":\"set\",\"path\":[\"last_run_finished\"],\"value\":\"2026-01-01\"}; {\"op\":\"append\",\"path\":[\"entries\"],\"value\":{\"id\":7}}; {\"op\":\"remove\",\"path\":[\"entries\",{\"id\":1234}]}; {\"op\":\"remove\",\"path\":[\"entries\",0]}; {\"op\":\"set\",\"path\":[\"entries\",{\"id\":5678},\"reason\"],\"value\":\"fixed\"}."
  2. Changed4 schema fields changed
    • changedInput schema / properties / dry_run / description
      Previous value: -"Preview the write without persisting. Returns current/proposed value, autoload state, and size delta."New value: +"Preview the write without persisting. Returns current/proposed value, autoload state, and size delta; with operations, the list of changes."
    • addedInput schema / properties / operations
      Added value: +{
      +  "description": "Changes to parts of the stored value, applied in order; if any one cannot be applied, none is. Each has op and path, and set / append also have value. path is a list of steps from the top of the value: a key (text), a position in a list (whole number, first item is 0), or a match such as {\"id\": 55784} that picks the one list item whose field has that value. Examples: {\"op\":\"set\",\"path\":[\"last_run_finished\"],\"value\":\"2026-01-01\"}; {\"op\":\"append\",\"path\":[\"entries\"],\"value\":{\"id\":7}}; {\"op\":\"remove\",\"path\":[\"entries\",{\"id\":55784}]}; {\"op\":\"remove\",\"path\":[\"entries\",0]}; {\"op\":\"set\",\"path\":[\"entries\",{\"id\":57654},\"reason\"],\"value\":\"fixed\"}.",
      +  "items": {
      +    "properties": {
      +      "op": {
      +        "enum": [
      +          "set",
      +          "append",
      +          "remove"
      +        ],
      +        "type": "string"
      +      },
      +      "path": {
      +        "items": {
      +          "type": [
      +            "string",
      +            "integer",
      +            "object"
      +          ]
      +        },
      +        "type": "array"
      +      },
      +      "value": {
      +        "type": [
      +          "string",
      +          "integer",
      +          "number",
      +          "boolean",
      +          "array",
      +          "object",
      +          "null"
      +        ]
      +      }
      +    },
      +    "required": [
      +      "op",
      +      "path"
      +    ],
      +    "type": "object"
      +  },
      +  "maxItems": 50,
      +  "type": "array"
      +}
    • changedInput schema / properties / value / description
      Previous value: -"New value (any JSON type). Full overwrite — read first, merge in your client, then write back."New value: +"New value (any JSON type). Full overwrite — read first, merge in your client, then write back. Leave out when sending operations."
    • changedInput schema / required
      Previous value: -[
      -  "name",
      -  "value"
      -]New value: +[
      +  "name"
      +]
  3. Added
  4. Removed
  5. First observed

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, readOnlyHint=false, and openWorldHint=true, and the description is consistent with that. Beyond the annotations it adds substantial context — denylist scope, allowlist opt-in, dry_run preview payload, and the fact that the write is queued for human approval in Royally rather than applied immediately. That approval detail is the most valuable addition, though the truncated final sentence leaves the approval semantics partly cut off.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The numbered gate list is well front-loaded and scannable, but the denylist enumeration is dense and the trailing sentence is truncated mid-word, leaving an unfinished thought in the description. Most sentences carry useful information, yet the density borders on a wall of text for what is a single-resource update.

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 explains what dry_run returns, what each error message conveys, and how the approval queue affects timing. For a destructive, gated mutation tool this covers the decisions an agent must make before calling it.

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 83%, so parameters are largely self-documented, and the description adds real meaning on top: value and operations are mutually exclusive, value is a full overwrite while operations are atomic partial edits, and dry_run returns current/proposed values plus autoload and size delta. The sentence introducing the value/operations choice is cut off mid-word, which weakens an otherwise strong explanation.

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 opening sentence names a specific verb and resource ("Update a WordPress option"), which cleanly separates it from the many sibling update_* tools that target posts, terms, media, or styles. It does not explicitly name a sibling alternative, but the resource is unambiguous and the implied read-first workflow points at wp_get_option.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives explicit preconditions and exclusions: the four gates that must pass in order, which failures are fixable (allowlist) versus permanent (denylist), and the guidance to preview with dry_run=true before writing. It also states the read-merge-write workflow, which tells the agent when this tool is the wrong first step.

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