Abilities

Last updatedView as Markdown

Mantle registers twelve abilities with the WordPress Abilities API. Abilities are the tool surface the AI chatbot calls, and they are also reachable by any other Abilities API client on the site.

Registered abilities

Verified with wp_get_abilities() on a running installation. All identifiers use the mantle/ prefix.

Reference

mantle/* abilities

Implemented in includes/Model/Abilities/, each extending Ability_Abstract and registered by Modules\AI_Chatbot\Abilities_Registrar.
12 fields
mantle/get-post string
Retrieve a single post.
mantle/search-posts string
Search posts.
mantle/get-content-details string
Retrieve details about a piece of content.
mantle/create-post-draft string
Create a draft post. Writes content.
mantle/create-page-draft string
Create a draft page. Writes content.
mantle/publish-post string
Publish a post. Makes content public.
mantle/generate-block-content string
Generate new block markup.
mantle/rewrite-block-content string
Rewrite the content of an existing block.
mantle/plan-block-edit string
Produce a plan for editing blocks without applying it.
mantle/generate-post-featured-image string
Generate and attach a featured image. Creates a media attachment.
mantle/set-permalink-structure string
Change the site permalink structure. Site-wide effect.
mantle/remember string
Persist a note into the chatbot’s memory, stored in the ai_chatbot_memory setting.

Enumerate abilities on your own site

List Mantle abilities bash
wp eval 'foreach ( wp_get_abilities() as $name => $ability ) { if ( 0 === strpos( $name, "mantle/" ) ) { echo $name . PHP_EOL; } }'
mantle/get-post
mantle/create-post-draft
mantle/generate-post-featured-image
mantle/publish-post
mantle/search-posts
mantle/set-permalink-structure
mantle/create-page-draft
mantle/get-content-details
mantle/rewrite-block-content
mantle/generate-block-content
mantle/plan-block-edit
mantle/remember

Abilities are also exposed over REST by the Abilities API itself at /wp-json/wp-abilities/v1/, independently of Mantle's own mantle/v1 namespace.

Relationship to the AI routes

Three Mantle REST routes wrap abilities for the block editor:

Flow

Editor to ability

6 relationships
The editor talks to Mantle’s namespace; Mantle invokes the corresponding ability.

Generated block markup passes through validation before it reaches the editor. Modules\AI_Chatbot\Validation contains a block validator, a markup sanitizer, a design linter, and a content preparer, so malformed or off-brand markup is rejected or repaired rather than inserted directly.

Prompting against this surface

Prompt Claude Opus 5 Code Thinking
Review every class in includes/Model/Abilities/ and report, for each ability: its registered name, its input schema, whether it writes to the database, and which capability gates it. Flag any ability that mutates content without a capability check.
@repository includes/Model/Abilities/ includes/Modules/AI_Chatbot/Abilities_Registrar.php
Audit prompt for the ability surface

Have a question about this page?

Linchpin assistant

Was this helpful?