Browse documentation +
Getting startedInstallationConnect a clientSafety profilesWordPress ChatPro licensingAntigravity CLIAntigravity IDETroubleshootingOAuth 2.1 setupApplication PasswordsPage builder workflowsLedger and rollbackApprovals and memoryAbility reference
Pro module32 abilities

Meta Box

These abilities register when Meta Box is detected on the site and a Pro licence is active. If either is missing the module stays absent rather than failing at call time.

At a glance

Meta Box registers 32 abilities: 14 that only read, 10 that write, and 8 marked destructive. That split is the practical answer to how much of this module can run unattended. Reads cost nothing and are safe to repeat, so discovery is the part to be generous with; the writes are where review belongs, and the destructive calls stop for an explicit confirmation every single time regardless of which profile is active.

What this module is for

Create and manage Meta Box field groups, post types, taxonomies, relationships, settings pages, object connections, and field values.

Before you rely on it: Relationship and schema edits need representative data tests to catch broken queries and templates.

Typical workflows

  • Design a relationship before connecting objects
  • Inspect field schemas before writing values
  • Update a settings page without changing its definition

The Meta Box integration page covers the same module from the workflow side, with the capability map and the questions worth asking before a first write.

Availability on your site

The Meta Box module needs three things at once: WPPilot Free as the MCP foundation, an active Pro licence, and the companion plugin detected on the site. Miss any one and the module does not register, which is deliberate: an ability that appears in the tool list but fails at call time is worse than an ability that was never offered. What the connected agent can actually call is then narrowed twice more: by the safety profile active on the site, and by the WordPress capabilities of the user behind the credential. A read that succeeds for an administrator can be absent entirely for an editor.

Every write these abilities perform is recorded in the change ledger, and destructive calls can be routed through the approval queue so a person signs off before anything is applied. A successful tool result means the operation returned, not that the front end, the cache, and every dependent template are correct: that still needs a look.

Reads

Available in every safety profile, including Read Only. Inspection costs nothing and is not rate limited.

AbilityWhat it does
wppilot/metabox-check-setupCheck Meta Box SetupReports the Meta Box environment: whether the core is active, the version, whether the minimum version is satisfied, which extensions are loaded (builder, cpt, settings page, relationships, term meta, comment meta, user meta, group field, custom table), and counts of field groups split by source (php-registered vs db-stored). Call BEFORE any other Meta Box ability — each *_active flag gates a specific ability group.
wppilot/metabox-get-field-group-schemaGet Meta Box Field Group SchemaReturns the schema of a single Meta Box field group identified by key. By default returns identity (key, title, source, post_types, context, priority) plus field_count — pass include_fields=true to inflate the fields[] array. Works for both PHP-registered and DB-stored groups. Use key from metabox-list-field-groups.
wppilot/metabox-get-field-type-schemaGet Meta Box Field Type SchemaReturns the option matrix for a single Meta Box field type. Call this before creating or editing a field to understand which settings are supported. Pass field_type as one of: text, textarea, wysiwyg, image, file, single_image, file_upload, image_upload, date, color, taxonomy, post, user, group, switch, checkbox, checkbox_list, radio, select, select_advanced, number, range, slider, password, email, url, hidden, autocomplete, time, datetime, week, month, oembed, button, key_value, custom_html, divider, heading, map, osm, sidebar, fieldset_text. Returns name, description, and an options object describing each supported key with its type, description, and default.
wppilot/metabox-get-post-typeGet Meta Box Post TypeReturns the full settings payload for a single MB Custom Post Type entry identified by slug. The payload mirrors the MB CPT internal format (slug, labels, public, hierarchical, supports, taxonomies, menu_icon, etc.) and can be used as a reference for metabox-edit-post-type.
wppilot/metabox-get-relationshipGet Meta Box RelationshipReturns the full settings for a single MB Relationships definition identified by id. The payload includes from/to configuration (object_type, post_types, empty_message, meta_box settings), source (always php — relationships are PHP-registered). Pass include_objects=true to get the first page of connected object pairs (delegated to metabox-list-connected-objects internally).
wppilot/metabox-get-settings-pageGet Meta Box Settings PageReturns the full settings for a single MB Settings Page entry identified by id. The payload includes id, menu_title, page_title, option_name, parent, capability, icon_url, position, style, columns, source (php|db). Use id with metabox-read-values (target.type=settings, target.id=<id>) to read the stored option values.
wppilot/metabox-get-taxonomyGet Meta Box TaxonomyReturns the full settings payload for a single custom taxonomy registered via MB Custom Post Type, identified by slug. The payload mirrors the MB CPT internal format (slug, labels, hierarchical, object_type, public, etc.) and can be used as a reference for metabox-edit-taxonomy.
wppilot/metabox-list-connected-objectsList Meta Box Connected ObjectsReturns a paginated list of objects connected via an MB Relationships type. Pass relationship_id plus one of from_id or to_id to query from/to connections; or pass both to check if a specific pair is connected. Results include object IDs (and post titles for posts). Pagination: limit (default 25, max 200) and offset.
wppilot/metabox-list-field-groupsList Meta Box Field GroupsReturns a lightweight overview of all Meta Box field groups from both PHP-registered and DB-stored (MB Builder) sources: key, title, source (php|db), post_types the group applies to, and field_count. Use to discover available groups before calling metabox-get-field-group-schema for the full schema. Accepts an optional post_type filter.
wppilot/metabox-list-post-typesList Meta Box Post TypesReturns a lightweight overview of all post types registered via MB Custom Post Type: slug, title, source (db), public flag, hierarchical flag, menu_icon, and active flag. Use to discover available post types before calling metabox-get-post-type for the full payload.
wppilot/metabox-list-relationshipsList Meta Box RelationshipsReturns a lightweight overview of all registered MB Relationships definitions: id, from (object type and post types), to (object type and post types), source (php — all relationships are PHP-registered via MB_Relationships_API::register()). Use id with metabox-get-relationship for the full settings payload.
wppilot/metabox-list-settings-pagesList Meta Box Settings PagesReturns a lightweight overview of all settings pages registered via MB Settings Page: id, menu_title, page_title, source (php|db), option_name, parent (parent page id if any). Use id with metabox-get-settings-page for the full payload.
wppilot/metabox-list-taxonomiesList Meta Box TaxonomiesReturns a lightweight overview of all custom taxonomies registered via MB Custom Post Type: slug, title, source (db), object_type (array of post types the taxonomy applies to), hierarchical flag. Use slug with metabox-get-taxonomy for the full payload.
wppilot/metabox-read-valuesRead Meta Box ValuesReads Meta Box field values from any target: post (target.type=post, target.id=<post_id>), term (type=term, id=<term_id>), user (type=user, id=<user_id>), comment (type=comment, id=<comment_id>), or settings page (type=settings, id=<settings_page_slug>). Pass fields[] to read specific field IDs; omit to read all Meta Box metadata on the target. Returns a values map keyed by field ID.

Writes

Gated by the active profile and your WordPress capabilities. Rate limited to 120 per minute per credential.

AbilityWhat it does
wppilot/metabox-connect-objectsConnect Meta Box ObjectsCreates a connection between two objects via an MB Relationships type. Pass relationship_id, from_id (the origin object ID), and to_id (the destination object ID). The connection is persistent (written to the MB relationships table). Calling this on an already-connected pair is a no-op (idempotent).
wppilot/metabox-create-field-groupCreate Meta Box Field GroupCreates a new Meta Box field group stored in the database (MB Builder). Requires MB Builder to be active (metabox-check-setup builder_active=true). Pass key (used as post_name and as the id in the field group config), title, post_types[], and fields[]. Each field must have at minimum an id and a type. Returns the new DB post ID and key. Source will always be "db".
wppilot/metabox-create-post-typeCreate Meta Box Post TypeCreates a new post type via MB Custom Post Type. Required: slug (also accepted as post_type, WordPress-native alias for slug) and title (also accepted as singular_name). Optional: labels (name, singular_name, etc.), public (default true), hierarchical (default false), supports (array of feature strings), menu_icon, rewrite (object), show_in_rest (default true), taxonomies (array). Reserved slugs (post, page, meta-box, mb-post-type, mb-taxonomy, mb-settings-page, mb-relationship) are rejected. Rewrite rules are soft-flushed on create/edit/delete, so the new URLs resolve from the NEXT request; on CDN/edge-cached sites a 404 fetched before that may linger in cache until purged.
wppilot/metabox-create-relationshipCreate Meta Box RelationshipCreates an MB Relationships type. When the MB Relationships builder is active (the mb-relationship CPT, shipped with Meta Box AIO / MB Core) the relationship is persisted as a published mb-relationship post — editable under Meta Box and re-registered every request — like the other metabox-create-* abilities; the response carries source:"db" plus db_post_id. On the free, API-only MB Relationships it falls back to an in-memory register for the current request only (source:"php" plus persistence_warning). Required: id, from, to. from/to take a post type slug or {object_type: post|term|user, post_type/taxonomy}. Optional: reciprocal, label_from, label_to.
wppilot/metabox-create-settings-pageCreate Meta Box Settings PageCreates a new settings page via MB Settings Page (stored in the mb-settings-page CPT). Required: id (unique page identifier used as slug and option_name unless overridden), menu_title. Optional: page_title, option_name, parent (parent page id), capability (default edit_theme_options), icon_url, position, style (boxes|no-boxes), columns (1 or 2). The settings page values are readable via metabox-read-values with target.type=settings and target.id=<id>.
wppilot/metabox-create-taxonomyCreate Meta Box TaxonomyCreates a new custom taxonomy via MB Custom Post Type. Required: slug (also accepted as taxonomy, WordPress-native alias) and title (also accepted as singular_name). Optional: object_type (array of post type slugs to attach to), hierarchical (default false), public (default true), show_in_rest (default true), labels, rewrite. Rewrite rules are soft-flushed on create/edit/delete, so the new URLs resolve from the NEXT request; on CDN/edge-cached sites a 404 fetched before that may linger in cache until purged.
wppilot/metabox-edit-post-typeEdit Meta Box Post TypeEdits an existing MB Custom Post Type entry. Required: slug (or post_type as alias) to identify the record. All other fields follow PATCH semantics — omitted keys are preserved. Changing the slug renames the post type but does NOT migrate existing posts.
wppilot/metabox-edit-relationshipEdit Meta Box RelationshipEdits an existing MB Relationships type. When the relationships builder is active this patches the DB-backed mb-relationship post in place (source:"db"); on the free API-only build it re-registers in memory for the current request (source:"php"). Supply only the fields to change: from, to, reciprocal, label_from, label_to.
wppilot/metabox-edit-settings-pageEdit Meta Box Settings PageEdits an existing DB-stored MB Settings Page. Required: id to identify the record. All other fields follow PATCH semantics. PHP-registered settings pages return metabox_php_registered.
wppilot/metabox-edit-taxonomyEdit Meta Box TaxonomyEdits an existing MB Custom Post Type taxonomy. Required: slug (or taxonomy alias) to identify the record. All other fields follow PATCH semantics — omitted keys are preserved.

Destructive

Marked destructive in the source, so each call needs an explicit confirmation flag, every time.

AbilityWhat it does
wppilot/metabox-delete-field-groupDelete Meta Box Field GroupPermanently deletes a DB-stored Meta Box field group. PHP-registered groups cannot be deleted (returns metabox_php_registered). Values previously stored under fields of this group remain in postmeta but become orphaned. Requires MB Builder.
wppilot/metabox-delete-post-typeDelete Meta Box Post TypePermanently deletes an MB Custom Post Type entry. Pass force=true to delete even when posts of that type exist (posts are orphaned in the database with the old post_type value). Idempotent: deleting a non-existent slug returns deleted=false.
wppilot/metabox-delete-relationshipDelete Meta Box RelationshipPermanently deletes all connections for an MB Relationships type. When the builder is active it also deletes the DB-backed mb-relationship post, so the type is fully gone (php_cleanup_required is empty). On the free API-only build the definition is PHP-registered, so php_cleanup_required tells you to remove the register() call from your code.
wppilot/metabox-delete-settings-pageDelete Meta Box Settings PagePermanently deletes a DB-stored MB Settings Page. The WP option storing field values is NOT deleted — it remains in wp_options as an orphan. PHP-registered pages return metabox_php_registered.
wppilot/metabox-delete-taxonomyDelete Meta Box TaxonomyPermanently deletes an MB Custom Post Type taxonomy. Pass force=true to delete even when terms exist under that taxonomy. Idempotent: deleting a non-existent slug returns deleted=false.
wppilot/metabox-disconnect-objectsDisconnect Meta Box ObjectsRemoves a connection between two objects in an MB Relationships type. Pass relationship_id, from_id, and to_id. Idempotent: disconnecting a pair that is not currently connected returns disconnected=false without error.
wppilot/metabox-edit-field-groupEdit Meta Box Field GroupEdits an existing DB-stored Meta Box field group. Only DB-source field groups can be edited (PHP-registered groups return metabox_php_registered). PATCH semantics: top-level keys you omit are preserved; the fields[] array follows REPLACE semantics — any field not in the payload is removed. Requires MB Builder to be active.
wppilot/metabox-write-valuesWrite Meta Box ValuesWrites a batch of Meta Box field values to a target (post, term, user, comment, or settings page). Pass target with type and id, and a values map keyed by field ID. For settings targets pass type=settings and id=<settings_page_slug>. Each value is written via rwmb_set_meta() for posts, or the appropriate meta update function for other object types. Optionally pass field_group_key (same as metabox-read-values) to fail fast when a values key does not belong to that group. Returns a results array with per-field status.