Update ACF Field Value
Updates a single field value, dispatching correctly based on the field type (plain text vs array vs object payload). Optionally runs ACF validation first.
| Property | Value |
|---|---|
| Ability slug | mosmcp/update-field-value |
| Wire tool name | mosmcp__update-field-value |
| Category | Advanced Custom Fields (mosmcp-acf) |
| Plan | Free |
Required access
| Requirement | Value |
|---|---|
| Capability | edit_posts, edit_post (checked against the specific post) |
| Minimum default role | Contributor |
| Requires | Advanced Custom Fields |
| Annotations | readOnly: false · destructive: false · idempotent: true · openWorld: true |
Input schema
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| field_key | string | Yes | — | Field name or field key to update. |
| post_id | integer | Yes | — | Post/page/CPT entry to update. |
| value | any | Yes | — | New value; shape depends on field type (string, number, array of IDs, etc.). |
| validate | boolean | true |
Run ACF validation before saving. |
Output schema
| Field | Type | Required |
|---|---|---|
| success | boolean | |
| saved_value | string \| number \| integer \| boolean \| array \| object \| null |
Example
Sample prompt
Change the subtitle on post 42 to 'Now in three colors'.
Example request (json)
{
"jsonrpc": "2.0",
"id": 428,
"method": "tools/call",
"params": {
"name": "mosmcp__update-field-value",
"arguments": {
"input": {
"field_key": "subtitle",
"post_id": 42,
"value": "Now in three colors"
}
}
}
}Example response (json)
{
"jsonrpc": "2.0",
"id": 428,
"result": {
"isError": false,
"structuredContent": {
"success": true,
"saved_value": "Now in three colors"
}
}
}
Edge cases / errors
- Value fails ACF validation (e.g. required field left empty, value over max length) → acfa_validation_failed with the messages in errors; nothing is saved.
- validate: false skips ACF validation and writes the value directly.
- Missing post → acfa_invalid_post; unknown field → acfa_field_not_found; no edit access to the post → permission refused.
- Writes straight to the post's live field data (no draft step); success can be false when the value is unchanged, while saved_value shows what is stored.
| << Previous | Next >> |
|---|---|
| Update ACF Field Group Location Rules | Update ACF Flexible Content Layout |
For more information about the Secure MCP Server for WordPress plugin, explore the following resources:
Product Overview | Pricing | Try for Free | Documentation
If you have any questions regarding plugin configuration, pricing plans or licensing, please contact us or mail us at aisupport@xecurify.com.