Get Hidden ACF Fields
Surfaces ACF fields attached to a post that are not visible in the editor UI — fields in inactive field groups or currently hidden by conditional logic — but are still readable through the API. Also reports WP screen elements hidden by field group "Hide on screen" settings.
| Property | Value |
|---|---|
| Ability slug | mosmcp/get-hidden-fields |
| Wire tool name | mosmcp__get-hidden-fields |
| 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: true · destructive: false · idempotent: true · openWorld: false |
Input schema
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| post_id | integer | Yes | — | Post/page/CPT entry to inspect. |
| group_key | string | — | Restrict to a single field group; otherwise scans all groups attached to the post. |
Output schema
| Field | Type | Required |
|---|---|---|
| hidden_fields | array | |
| hidden_screen_elements | array |
Example
Sample prompt
Are there any hidden custom fields on post 42 that editors can't see in the editor?
Example request (json)
{
"jsonrpc": "2.0",
"id": 423,
"method": "tools/call",
"params": {
"name": "mosmcp__get-hidden-fields",
"arguments": {
"input": {
"post_id": 42
}
}
}
}Example response (json)
{
"jsonrpc": "2.0",
"id": 423,
"result": {
"isError": false,
"structuredContent": {
"hidden_fields": [
{
"field_key": "field_64f1a2e1",
"field_name": "sale_badge",
"field_type": "text",
"group_key": "group_64f1a2b3",
"reason": "conditional_logic",
"value": "Hot deal"
}
],
"hidden_screen_elements": [
"the_content",
"excerpt"
]
}
}
}
Edge cases / errors
- post_id does not exist → acfa_invalid_post; caller cannot edit the post → permission refused.
- Without group_key, the scan covers groups matching the post plus every inactive group on the site; fields in an inactive group are reported with reason: inactive_field_group.
- Fields in active groups are reported only when their conditional logic currently evaluates to hidden (reason: conditional_logic).
- An unknown group_key is not an error → empty hidden_fields and hidden_screen_elements arrays.
| << Previous | Next >> |
|---|---|
| Get All ACF Fields for Post | List ACF Field Groups |
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.