[wp-trac] [WordPress Trac] #64955: Add schema compiler for AI tool calling compatibility
WordPress Trac
noreply at wordpress.org
Tue Jun 2 14:21:47 UTC 2026
#64955: Add schema compiler for AI tool calling compatibility
--------------------------------------+-----------------------
Reporter: gziolo | Owner: gziolo
Type: enhancement | Status: assigned
Priority: normal | Milestone: 7.1
Component: Abilities API | Version: 6.9
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests | Focuses: rest-api
--------------------------------------+-----------------------
Comment (by gziolo):
The preparatory work is complete. Ability input and output schemas sent
through the REST API are now aligned with how they're validated on the
client in the `@wordpress/abilities` package: the `required` keyword is
normalized to the standard draft-04 array form, and only the properties
recognized by the REST API's own validation are returned from the server
(WordPress-internal keys and unsupported keywords are stripped). This
keeps the published schema consistent with what the server enforces and
ensures it also passes the stricter validation applied on the client.
Behavior is now covered by an additional set of unit tests on both the
server and the client.
With this in place, we're in a good position to address the feedback
raised by @jorgefilipecosta in https://github.com/WordPress/wordpress-
develop/pull/12013#discussion_r3335149882 and start generalizing the
schema handling so it's applied during ability registration as outlined in
the ticket. Handling it universally means it would work seamlessly with
the WP AI Client and the MCP adapter.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/64955#comment:23>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list