Skip to main content
Glama

mcp_set_option

Create or update any WordPress option value by site and key, with optional autoload. Rejects masked values to prevent overwriting stored secrets.

Instructions

Create or update an option (any option, no allow-list: be careful with siteurl, home, active_plugins etc.). A value containing "[masked]" is refused, since writing back a masked read would destroy the stored secret. The echoed value is masked like reads. Note: created is always false (cvrt-mcp-endpoints 1.14.2 checks it after writing).

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": {
      "site": "<site>",
      "key": "<key>"
    },
    "name": "mcp_set_option"
  }
}

Input Schema

NameRequiredDescriptionDefault
keyYesOption name (letters, digits, _ and -; the server lowercases it)
siteYesSite id (see list_sites)
valueNoOption value (any JSON type; arrays/objects are stored serialized). Required.
autoloadNoLoad on every page (default true). Only applied when the value changes or the option is new.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv3.14.0
    • changedInput schema / properties / autoload / description
      Previous value: -"Load on every page"New value: +"Load on every page (default true). Only applied when the value changes or the option is new."
    • changedInput schema / properties / key / description
      Previous value: -"Option name"New value: +"Option name (letters, digits, _ and -; the server lowercases it)"
    • addedInput schema / properties / key / pattern
      Added value: +"^[a-zA-Z0-9_-]+$"
    • changedInput schema / properties / value / description
      Previous value: -"Option value (any type)"New value: +"Option value (any JSON type; arrays/objects are stored serialized). Required."
  2. Changed2 schema fields changedv3.4.0
    • addedInput schema / properties / site
      Added value: +{
      +  "description": "Site id (see list_sites)",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "key"
      -]New value: +[
      +  "site",
      +  "key"
      +]
  3. First observedv2.0.0

TDQS

A4.3/5.0
Behavior4/5

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

No annotations exist, so the description carries the full burden and does so well: it discloses the masked-value refusal and its rationale (writing back a masked read destroys the stored secret), that echoed values are masked, and the surprising "created is always false" quirk with its cause. It omits permission/capability requirements and whether failures are atomic, which keeps it below 5.

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?

Three dense sentences, front-loaded with the action and its broad scope, then the safety constraint, then the return quirk. The version string (cvrt-mcp-endpoints 1.14.2) is slightly noisy but justifies why the `created` flag is untrustworthy.

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?

For an unannotated mutation tool with no output schema, the description covers the main risks an agent needs: it can write anything, secrets can be destroyed, and the returned `created` flag is meaningless. Missing only permission prerequisites and the full shape of the echoed response.

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 100%, so the baseline is 3, but the description adds real meaning beyond it: it names concrete high-risk `key` values and explains why certain `value` inputs are rejected. The autoload conditional behavior is already in the schema, so nothing extra is needed there.

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?

States a specific verb and resource ("Create or update an option") and immediately scopes it as an unrestricted write ("any option, no allow-list"). This clearly separates it from the read/delete siblings (mcp_get_option, mcp_delete_option, mcp_bulk_get_options) without needing to name them.

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?

Gives concrete caution guidance on which keys are dangerous to touch (siteurl, home, active_plugins) and a hard exclusion: values containing "[masked]" are refused. It stops short of routing to alternatives (e.g., use mcp_get_option first to read, mcp_delete_option to remove), so it is clear context rather than explicit when/when-not/alternative guidance.

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

Deploy Server

Other Tools