# Ability: acf/field-groups

Lists all ACF field groups that allow AI access.

## Description

Returns an array of field groups that have AI access enabled. Each field group includes its full configuration, fields, and location rules.

## Input

This ability accepts no input parameters.

```
null
```

## Output

```
{
  "field_groups": [
    {
      "ID": 123,
      "key": "group_abc123",
      "title": "Product Fields",
      "fields": [...],
      "location": [...],
      "position": "normal",
      "style": "default",
      "active": true,
      "show_in_rest": true,
      "allow_ai_access": true,
      "ai_description": "Fields for product information including price, SKU, and inventory."
    }
  ],
  "count": 1,
  "message": "Found 1 field group(s) with AI access enabled."
}
```

### Output Properties

`field_groups`
*(array)* Array of field group objects.

`count`
*(integer)* Total number of field groups returned.

`message`
*(string)* Human-readable status message.

### Field Group Properties

| Property | Type | Description |
| --- | --- | --- |
| `ID` | integer | WordPress post ID |
| `key` | string | Unique field group key (e.g., `group_abc123`) |
| `title` | string | Field group title |
| `fields` | array | Array of field configurations |
| `location` | array | Location rules determining where the field group appears |
| `position` | string | Metabox position (`normal`, `side`, `acf_after_title`) |
| `style` | string | Metabox style (`default`, `seamless`) |
| `active` | boolean | Whether the field group is active |
| `show_in_rest` | boolean | Whether exposed in REST API |
| `allow_ai_access` | boolean | Whether AI access is enabled |
| `ai_description` | string | Description to help AI understand the purpose |

## Annotations

| Annotation | Value |
| --- | --- |
| `readonly` | true |
| `destructive` | false |
| `idempotent` | true |

## Permissions

Requires the ACF capability (default: `manage_options`).

## Example

```
List all field groups available for AI access.
```

Response:

```
{
  "field_groups": [
    {
      "ID": 45,
      "key": "group_product_details",
      "title": "Product Details",
      "fields": [
        {
          "key": "field_price",
          "label": "Price",
          "name": "price",
          "type": "number"
        },
        {
          "key": "field_sku",
          "label": "SKU",
          "name": "sku",
          "type": "text"
        }
      ],
      "location": [
        [
          {
            "param": "post_type",
            "operator": "==",
            "value": "product"
          }
        ]
      ],
      "active": true,
      "allow_ai_access": true,
      "ai_description": "Core product information fields"
    }
  ],
  "count": 1,
  "message": "Found 1 field group(s) with AI access enabled."
}
```

## Notes

- Only field groups with `allow_ai_access` set to `true` are returned
- Field configurations include all field settings and conditional logic
- Location rules use the same format as ACF’s PHP registration