Update Global Settings is a WordPress ability from SureForms — usable via Easy MCP AI, which connects Claude, ChatGPT, and any AI assistant to your site.
Install Free Plugin →Update Global Settings
DestructiveUpdate SureForms' global settings for one category at a time: general, validation-messages, email-summary, or security.
Requires the SureForms plugin on WordPress 6.9+ (the Abilities API is gated behind function_exists('wp_register_ability'), so it degrades gracefully on WP 6.4-6.8). Abilities only register when the 'srfm_abilities_api' option is enabled in SureForms' AI settings, and every ability requires the current user to have the 'manage_options' capability. Abilities that create or modify data additionally require the 'srfm_abilities_api_edit' option to not be explicitly disabled; abilities that permanently delete data additionally require 'srfm_abilities_api_delete' to not be explicitly disabled.
What it does
This ability writes to one of SureForms' four global settings categories, but only for keys present in an explicit per-category allow-list — any other key in the submitted settings object is silently dropped to prevent arbitrary option injection. Values are sanitized per type (booleans via rest_sanitize_boolean, emails via sanitize_email, everything else via sanitize_text_field), and for the security category, any field still holding the masked sentinel value is replaced with the previously stored secret rather than overwriting it, preserving round-trip safety with get-global-settings. Its MCP annotations mark it destructive, with instructions to confirm the category and specific keys with the user and to never display real secret values. This lets an AI assistant reconfigure SureForms behavior (like enabling the weekly email summary or turning on the honeypot) on request.
See it in action
You ask your AI assistant
"Turn on the honeypot spam protection in SureForms security settings."
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| category | string | Yes | The settings category to update: general, validation-messages, email-summary, or security. |
| settings | object | Yes | Key-value pairs of settings to update; only keys on the category's allow-list are applied. |
Returns
An object with a saved boolean and the category string that was updated.
Permission
Requires the 'manage_options' capability, the 'srfm_abilities_api' master option enabled, and the 'srfm_abilities_api_edit' gate option must not be explicitly disabled.
More SureForms abilities
Bulk Get Entry Details
Retrieve full submitted data for up to 50 SureForms entries in a single call.
Create SureForms Form
Create a new SureForms form from a title, an array of field definitions, and optional metadata.
Delete Entry
Permanently delete one or more SureForms submission entries.
Delete SureForms Form
Move a SureForms form to trash, or permanently delete it when force is set.
Duplicate SureForms Form
Clone an existing SureForms form, including its fields, metadata, and settings, as a new draft.
Get Entry Details
Retrieve the full submitted data for a single SureForms entry, with field labels resolved.