Options Toolswordpress_get_option

wordpress_get_option

Get a WordPress option value by name. Keys, tokens and passwords come back as [redacted]; a full read asks a person first.

wordpress_get_option

Get option value by name.

Since plugin 9.1.13, values that look like keys, tokens or passwords come back as [redacted], the way a listing has shown them since 9.1.0. That covers an option that is itself a key and a key stored inside a plugin's settings array. Everything else in the option reads as it is stored, and an empty key reads as empty, so "is it set" still has an answer.

Parameters

4 parameters, 1 required.

NameTypeRequiredWhat it is
optionstringyesOption name
pathstring or listnoRead one key inside an option that holds many settings: a dot path such as custom_footer_credits or social.facebook_url, or a list of keys. Up to 6 levels. A key that is not there answers exists: false, not an error. Plugin 9.1.15 and MCP server 8.4.13.
reveal_secretsbooleannoReturn keys, tokens and passwords in full instead of [redacted]. Approval-gated when the option holds any. Default false. Plugin 9.1.13 and MCP server 8.4.11.
approval_tokenstringnoApproval token from the first reveal_secrets call's respira_approval_required answer. Send it back unchanged with the same arguments.

Example call

The smallest valid call, with the required parameters only:

{
  "name": "wordpress_get_option",
  "arguments": {
    "option": "value"
  }
}

Response

An option with nothing to hide:

{
  "name": "blogname",
  "value": "My Site"
}

A settings array that holds a key:

{
  "name": "example_gateway_settings",
  "value": {
    "enabled": "yes",
    "title": "Card",
    "api_key": "[redacted]",
    "webhook": { "url": "https://example.com/hook", "secret": "[redacted]" }
  },
  "redacted": true,
  "redacted_fields": ["api_key", "webhook.secret"]
}

redacted_fields names each hidden value by its path. The answer also carries a note saying how to read them.

Reading a secret in full

Send reveal_secrets: true. When the option holds a secret, the first call answers respira_approval_required with an approval token and a predicted effect that names the option and says its keys leave the site and reach the AI assistant. A person confirms, and the second call carries the token and returns the full value with secrets_revealed, the number of fields shown. The token works for ten minutes, for that option and that connection.

An option with nothing to hide never asks: reveal_secrets on blogname answers at once.

WordPress salts and Respira's own licence key and tokens are never returned, with or without reveal_secrets.

Do not write the placeholder back

[redacted] is a placeholder, not the value. wordpress_update_option refuses a value that carries it with respira_redacted_value_in_write, because writing it would replace the real key with that text. To change another field of an option that holds a key, read it with reveal_secrets: true first and send the full value back.

What it changes

Nothing. It only reads, so there is nothing to undo. A plain read needs no approval. A read with reveal_secrets is written to the site's activity log as a read that revealed secrets.

When it fails

The failures seen most often on real sites in the last 30 days, most common first:

  • respira_option_not_found: The option does not exist on this site. Call wordpress_list_options to see what is stored.
  • respira_rate_limit_exceeded: The site reached its hourly limit of calls for this key. Reads count too. Wait, or raise the limit in WP admin under Respira, Settings, Rate limit.
  • respira_site_id_not_found: No connected site has that ID. Call respira_list_sites and use an ID from the result.
  • rest_no_route: The WordPress site has no such endpoint. Almost always an old plugin version, or a security plugin blocking the REST API. Update Respira for WordPress on the site and try again.

How long it takes

A typical call takes about 1.8 seconds. 19 in 20 finish within 4.0 seconds. Measured on real sites over the last week, so it includes the site's own hosting.

Availability

Works on any WordPress site, whichever page builder it uses. Available since Respira 1.0.0.

Example Prompts

  • "Get the blogname option"
  • "What is the value of option 'permalink_structure'?"