royal-mcp__wp_update_option
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
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| value | No | New value (any JSON type). Full overwrite — read first, merge in your client, then write back. Leave out when sending operations. | |
| dry_run | No | Preview the write without persisting. Returns current/proposed value, autoload state, and size delta; with operations, the list of changes. | |
| site_id | No | Site to run this tool on: 8ef2e52b-bd07-4671-a363-ebe8b480b65c (https://demo.royalplugins.com) | |
| operations | No | 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"}. | |
| expected_sha256 | No | 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. |