What AI Agents Can Read in WordPress 7.2

WordPress 7.2 adds built-in abilities for reading content, users, and settings. Try a PHP draft inventory and see how account permissions shape the results.

WordPress 7.2 Abilities API cover showing a magnifying glass over documents, with user and settings icons.

An editor preparing a weekly status report needs to know which articles are still in draft. WordPress 7.2 gives integrations a built-in way to fetch that list. An assistant can put together the report from post IDs and titles while the article bodies stay on the site.

WordPress made these changes available for testing in WordPress 7.2 Release Candidate 3 (RC3) on November 24, 2026. The release candidate is for test sites. The new operations build on the Abilities API introduced in WordPress 6.9. WordPress 7.2 RC3 announcement

Three new ways to query WordPress

An ability is a named operation with defined inputs, a result, and a permission check. WordPress 7.2 adds these three read-only abilities to Core.

Ability What it can retrieve What shapes the result
core/content-query Posts and pages that match filters such as status, author, or slug Drafts require appropriate access. Raw versions of the title, excerpt, and content are available when the current user can edit the post.
core/users-query Users that match filters such as username or role WordPress restricts fields such as email and roles to the current user's account and accounts that user can edit.
core/settings-get Exposed settings such as the site title and timezone The caller needs the manage_options capability and can ask for selected settings.

The content and user filters match exact values. A request for a draft inventory can filter by status and post type. A request to find articles that mention a phrase calls for a full-text search elsewhere. WordPress Core developer note

Try a draft inventory in PHP

On a WordPress 7.2 test site, create a few sample drafts. Save this as list-drafts.php and run it with WP-CLI as a WordPress user whose draft access you want to check. The call runs inside WordPress without sending a prompt to an AI provider.

<?php

$ability = wp_get_ability( 'core/content-query' );

if ( null === $ability ) {
    WP_CLI::error( 'This installation is missing core/content-query.' );
}

$drafts = $ability->execute(
    array(
        'where'      => array(
            'type'   => 'post',
            'status' => array( 'draft' ),
        ),
        'fields'     => array( 'title' ),
        'pagination' => array( 'per_page' => 5 ),
    )
);

if ( is_wp_error( $drafts ) ) {
    WP_CLI::error( $drafts->get_error_message() );
}

WP_CLI::line( wp_json_encode( $drafts, JSON_PRETTY_PRINT ) );

Run this from the test site's WordPress directory, replacing editor-login with the account's username.

wp eval-file list-drafts.php --user=editor-login

The response includes up to five matching items, along with pagination totals. Each item includes its ID automatically. To check an integration's access before deployment, run the same query with the account it will use and look for the expected draft IDs. WP-CLI command reference

How an AI assistant gets the results

A plugin running inside WordPress can offer core/content-query as a tool through the WordPress AI Client. The plugin calls the ability when the model requests it and can choose which fields to pass back to the AI provider. An external assistant using the Model Context Protocol (MCP) needs a configured connection to a server that exposes the ability. Account permissions still apply. DemystIA's guide to WordPress MCP Adapter

Plugin developers can opt a custom post type into content queries with show_in_abilities. For example, a team that stores documentation in a custom post type can choose to include it in an inventory. The flag is separate from show_in_rest and WordPress expects the type to be registered on init.

An editorial team can start with a report that shows which drafts exist and who can see them. If the workflow also needs to change a title or publish a post, those actions require a separate write operation with its own permissions. The draft inventory is a way to test the data and account access before adding that step.

Sources