Skip to main content
Glama

wp_set_option

Sets a WordPress option value with dry-run default and verifies the written value, requiring REST transport and admin credentials.

Instructions

Write ANY wp_options row - including siteurl/home, where a wrong value can take the site offline.

There is NO allowlist here: this reaches every option a plugin or theme reads, including the ones that decide where WordPress thinks it lives. Setting siteurl or home to a wrong value takes the site offline and locks you out of wp-admin (recovery needs database or wp-config access, not this server). Treat unfamiliar options the same way - many are serialized plugin settings where a partial write corrupts the whole structure. READ IT FIRST with wp_get_option and keep the old value. The dry-run preview shows the option's CURRENT value next to the new one so an overwrite is visible before it happens. DEFAULTS TO dry_run=true (writes nothing). Pass dry_run=false to write - the write is verified by re-reading the option, tolerating WordPress's storage casts (25 vs '25', true vs 1, '&' escaped to '&'), and the result carries the site's ACTUAL stored value next to what you requested. Requires the REST transport, wp-ops-connect 1.3.0+ and an administrator app password. Prod writes require allow_prod=true.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
valueYes
dry_runNo
installYes
allow_prodNo

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv1.4.0

TDQS

A4.8/5.0
Behavior5/5

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

The description fully discloses the tool's behavior: it writes any option, potential offline consequences, storage cast tolerances, and that the result includes the actual stored value. Since no annotations are provided, the description carries the full burden and does so thoroughly.

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 description is well-structured and front-loaded with the critical warning, but it contains some redundancy (e.g., the dry_run default and the siteurl/home warning are repeated). It is slightly verbose, but the complexity of the tool justifies most of the detail, and the repetition reinforces safety without significant confusion.

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?

The description covers all essential aspects for an agent: the action, risks, prerequisite conditions, return behavior, and safety defaults. It doesn't mention error handling, but that is not necessary for a complete understanding of how to invoke the tool. The context is rich enough to make an informed decision.

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?

The schema defines all five parameters, but the description adds meaningful context for dry_run (default true, writes nothing), allow_prod (required for prod writes), and value (tolerates casts). The 'install' parameter is not explicitly explained but its name and role are straightforward from the context. Overall, the description supplements the schema well, though a minor gap remains for 'install'.

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?

The description clearly states the tool's action: 'Write ANY wp_options row.' It also identifies the resource (wp_options), the potential risk with siteurl/home, and the overall purpose. There is no ambiguity about what the tool does.

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?

The description provides extensive guidance: it warns about the lack of an allowlist, advises reading the option first with wp_get_option, emphasizes the dry_run default and how to actually write, and specifies prerequisites (REST transport, wp-ops-connect version, admin app password, allow_prod for production). This leaves no doubt about when and how to safely use the tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ad02/wp-ops-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server