Write a site option
set_optionWrite a value to a WordPress option to adjust plugin or theme behavior. Read existing values with get_options first, and prefer official settings screens to avoid breaking the site.
Instructions
Write a value to the WordPress options table. Options drive plugin and theme behaviour, and a wrong value can break the site — read the current value first with get_options, and prefer a plugin's own settings screen or ability where one exists.
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>",
"value": "<value>"
},
"name": "set_option"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Option name. | |
| value | Yes | New value. Arrays and objects are serialised the way WordPress expects. | |
| site_id | No | Which configured WordPress site to act on. Optional — with a single site configured it is used automatically; with several, the default site is used unless you name one. Run list_sites for valid ids. | |
| autoload | No | Whether to load this option on every page request. Leave unset to keep the current behaviour; large values should not autoload. |