Get ACF Conditional Logic Rules
Returns conditional logic tied to a field, so an agent does not attempt to set a field that is currently hidden or disabled by another field's state.
| Property | Value |
|---|---|
| Ability slug | mosmcp/get-conditional-logic-rules |
| Wire tool name | mosmcp__get-conditional-logic-rules |
| 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 |
|---|---|---|---|---|
| field_key | string | Yes | — | Field name or key to inspect. |
| post_id | integer | — | Optional post context; when supplied, the rules are evaluated and an is_visible boolean is returned. |
Output schema
| Field | Type | Required |
|---|---|---|
| has_conditional_logic | boolean | |
| rules | array \| null | |
| is_visible | boolean \| null |
Example
Sample prompt
Is the 'sale_badge' field currently shown on post 42, and what controls it?
Example request (json)
{
"jsonrpc": "2.0",
"id": 414,
"method": "tools/call",
"params": {
"name": "mosmcp__get-conditional-logic-rules",
"arguments": {
"input": {
"field_key": "sale_badge",
"post_id": 42
}
}
}
}Example response (json)
{
"jsonrpc": "2.0",
"id": 414,
"result": {
"isError": false,
"structuredContent": {
"has_conditional_logic": true,
"rules": [
[
{
"field": "field_64f1a2e0",
"operator": "==",
"value": "1"
}
]
],
"is_visible": false
}
}
}
Edge cases / errors
- field_key matches no ACF field → acfa_field_not_found error.
- Without post_id, is_visible is null; with a post_id that doesn't exist → acfa_invalid_post.
- A field without conditional logic returns has_conditional_logic: false, rules: null, and is_visible: true when a post is given.
- With post_id, the caller must be able to edit that post; otherwise permission is refused.
| << Previous | Next >> |
|---|---|
| Create ACF Field Group | Get ACF Field Group |
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.