Knowledge Base registers WordPress Abilities API tools for AI agents and other integrations. The free plugin provides read-only article search and section discovery. Knowledge Base Pro adds draft article creation, the Ask the Docs ability and GitHub import tools.
The Abilities API is built into WordPress 6.9 and later. Knowledge Base does not include a polyfill. All Knowledge Base abilities use the shared webberzone category.
Discover and run abilities
Use wp_get_abilities() in PHP to inspect registered abilities. The WordPress REST API exposes them at:
Run a read-only ability with GET and pass its input as query parameters. Run an ability that changes site data with POST and pass its input as JSON. The HTTP method is determined by the ability’s annotations.
Create-article uses POST with an input object in the JSON body:
Requests use WordPress REST authentication. The ability permission callback is enforced for PHP, REST and MCP calls; listing an ability does not grant permission to run it.
Free abilities
knowledgebase/search-articles
Search published Knowledge Base articles. Use a few distinctive keywords and optionally limit results to a section by its term ID or slug.
| Input | Type | Required | Description |
|---|---|---|---|
query | string | yes | Search keywords or a short phrase, 2 to 500 characters. |
section | integer or string | no | wzkb_category term ID or slug. String values are matched as slugs first, then numeric strings fall back to a term ID. |
limit | integer | no | Maximum results, 1 to 50. Default: 10. |
Each result contains id, plain-text title, url, plain-text excerpt, and a section array. Each section contains id, name, and slug.
The ability requires the read capability and filters each result through WordPress’s read_post capability. It also respects the wzkb_rest_route_permission filter for the search route, so visibility rules configured for the REST search endpoint also apply.
knowledgebase/get-sections
Return the hierarchical wzkb_category section tree.
| Input | Type | Required | Description |
|---|---|---|---|
parent | integer | no | Parent section ID. Omit or use 0 for top-level sections. |
Each section contains id, name, slug, url, and children. Supplying a parent returns its child sections and their descendants. The ability requires read and respects the wzkb_rest_route_permission filter for the sections route.
Pro abilities
knowledgebase/create-article
Create an article as a draft for an editor to review. The ability always sets post_status to draft; publishing remains a manual action in WordPress.
| Input | Type | Required | Description |
|---|---|---|---|
title | string | yes | Article title, 1 to 200 characters. |
content | string | yes | Article content, 1 to 100,000 characters. Safe post HTML is allowed. |
section | integer | no | Existing wzkb_category term ID. |
The ability requires the Knowledge Base post type’s create capability, which defaults to edit_posts. When section is supplied, the user must also be able to assign terms. It returns the new article’s id and edit_url.
knowledgebase/ask
Knowledge Base Pro also registers the Ask the Docs ability. It accepts a question, returns the same answer data as the Ask the Docs REST endpoint, and is available to logged-in users by default. It is registered only on WordPress 7.0 or later, where Ask the Docs loads. See the Ask the Docs developer reference for its filters, response and limits.
GitHub import abilities (Pro only)
Knowledge Base Pro 3.3.0 adds three abilities that let an AI agent drive the GitHub documentation sync: list your import sources, preview a planned import and run it. They use the GitHub mappings configured under Knowledge Base → Settings → GitHub (see Syncing Docs with GitHub). Credentials are never returned.
knowledgebase/list-github-mappings
Lists every enabled GitHub import source.
| Field | Type | Description |
|---|---|---|
id | string | Stable source ID. It changes if the mapping’s import-related settings change. |
repo | string | GitHub owner and repository name. |
folder | string | Imported repository folder, or an empty string for the repository root. |
branch | string | Configured branch, or an empty string to use the repository default. |
has_credentials | boolean | Whether a mapping or global GitHub token is configured. This does not verify token access. |
knowledgebase/preview-github-import and knowledgebase/import-github-articles
Both abilities take the same input. Preview reports the planned changes without touching articles; import applies them, following each mapping’s duplicate handling, exclusions, product and default status.
| Input | Type | Required | Description |
|---|---|---|---|
mapping_ids | array of strings | one of the two selectors | Stable mapping IDs returned by the list ability. |
all | boolean | one of the two selectors | Set true to select every enabled mapping. Cannot be combined with mapping_ids. |
file | string | no | Exact repository-relative Markdown path to limit the run to one file. Omit to process every Markdown file in the selected mappings. |
Each result contains mapping_id, repo, path, action (such as created, updated, skipped, excluded, deleted, uncertain or error), post_id, and a note, warning and error with any details.
Listing and previewing require manage_options. Importing also requires the Knowledge Base post type’s edit, publish and delete capabilities, and the ability to assign the Knowledge Base section, product and tag terms.
Import is destructive, so it runs with POST and a JSON body:
WP-CLI
Knowledge Base Pro 3.3.0 adds WP-CLI commands for search, status, cache, settings, ratings, Ask the Docs and GitHub documentation sync. See Knowledge Base WP-CLI commands for the full reference.
