Inicio - Documentación - POM AI - 16 MCP - WordPress site and menu tools - `wp_update_option`: update an allowed option

wp_update_option: update an allowed option

Writes one WordPress option, from an allowlist of five.

Arguments

Argument Required Meaning
option Yes The option name
value Yes The new value
dry_run No Report without writing

Permissions

Allow option writes open — its own gate, separate from content writes — and the manage_options capability.

Opening the content gate does not permit option writes. That separation exists because editing a post affects a post, and changing an option affects the site.

What can be written

Option Is
blogname The site title
blogdescription The tagline
posts_per_page How many posts an archive shows
date_format Date display format
time_format Time display format

Five, and no more. Anything else is refused with pom_ai_mcp_option_denied, including options that are readableadmin_email and timezone_string can be read and not written.

The sensitive-name guard applies on top, so credentials and core structural options are refused regardless.

The pom_ai_mcp_writable_options filter can narrow these five options. It cannot add user registration, roles, credentials or other settings to the write catalog.

The dry run is a real comparison

Unlike most write tools in the MCP server, this one returns a genuine before and after:

Use a dry run to change the tagline and show me the before and after.

Use it every time. These are site-wide values and the comparison costs one call.

posts_per_page is validated

The value is clamped between 1 and 500. Sending something outside that range produces a clamped result rather than an error, so read the response rather than assuming your number was stored.

Also consider the effect before changing it: it governs pagination across every archive on the site. Setting it very low creates hundreds of pagination pages; setting it very high makes archive pages slow.

Each of the five has a wide surface

blogname appears in page titles, browser tabs, feeds, emails WordPress sends, and search results.

blogdescription appears in the header on most themes, in feeds, and often as a fallback meta description.

posts_per_page changes every archive's pagination.

date_format and time_format change every displayed date on the site. Check the result matches the conventions your audience expects — a format that reads naturally to you may not to them.

None of these is a small edit. All five are things a visitor sees.

No revision history

Options have no revisions. The old value is gone unless you recorded it.

Show me the current tagline, then change it.

The dry run's before also gives you the old value in the response, which is worth keeping.

After writing

  1. Read it back.
  2. Look at the rendered site — the header, a page title, an archive.
  3. Purge the cache. These values appear on every page, so a stale cache makes a correct change look broken.

What it returns

Whether the update succeeded. As with meta writes, WordPress reports no change when the new value equals the old, so a false result can mean "already correct".

Common problems

Symptom Cause
The write is refused Allow option writes is closed
pom_ai_mcp_option_denied Not on the writable list, or caught by the guard
pom_ai_mcp_forbidden No manage_options
posts_per_page is not what you sent Clamped to 1–500
A false result The value was already identical
The site looks unchanged Cache not purged

Related