Abilities Reference
Abilities are the atomic actions that Gratis AI Agent can invoke on your WordPress installation. Each ability is a registered PHP class that exposes a JSON schema — the agent reads this schema at runtime to understand what parameters are required and what the ability returns.
This page documents all abilities shipping with Gratis AI Agent v1.9.0.
Custom Post Types
These abilities manage custom post types (CPTs) registered through the agent. Registrations are persisted to the WordPress options table so they survive plugin deactivation and reactivation.
register_post_type
Registers a new custom post type.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
slug | string | Yes | The post type key (max 20 characters, no uppercase, no spaces) |
singular_label | string | Yes | Human-readable singular name, e.g. Portfolio Item |
plural_label | string | Yes | Human-readable plural name, e.g. Portfolio Items |
public | boolean | No | Whether the post type is publicly accessible. Default true |
supports | array | No | Features to support: title, editor, thumbnail, excerpt, comments, revisions, custom-fields. Default ["title","editor"] |
has_archive | boolean | No | Whether a post type archive page is enabled. Default false |
menu_icon | string | No | Dashicons class or URL for the admin menu icon. Default "dashicons-admin-post" |
rewrite_slug | string | No | URL slug for the post type. Defaults to slug |
Example
{
"slug": "portfolio",
"singular_label": "Portfolio Item",
"plural_label": "Portfolio Items",
"public": true,
"supports": ["title", "editor", "thumbnail"],
"has_archive": true,
"menu_icon": "dashicons-portfolio"
}
Returns { "success": true, "slug": "portfolio" }
list_post_types
Returns all custom post types registered by the agent.
Parameters — none
Returns
{
"post_types": [
{
"slug": "portfolio",
"singular_label": "Portfolio Item",
"plural_label": "Portfolio Items",
"public": true
}
]
}
delete_post_type
Unregisters a custom post type previously registered by the agent. Existing posts of that type remain in the database but are no longer accessible via the post type.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
slug | string | Yes | The post type key to remove |
Returns { "success": true, "slug": "portfolio" }
Custom Taxonomies
These abilities manage custom taxonomies. Like CPTs, taxonomy registrations are persisted.