[wp-trac] [WordPress Trac] #64955: Add schema compiler for AI tool calling compatibility
WordPress Trac
noreply at wordpress.org
Mon Jun 1 11:52:16 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):
In [changeset:"62440" 62440]:
{{{
#!CommitTicketReference repository="" revision="62440"
Abilities API: Add coverage for ignored schema
`validate_callback`/`sanitize_callback`
Add characterization tests documenting that an ability ignores two REST-
style schema keywords:
* `validate_callback` is never invoked. The REST request layer calls it,
but `rest_validate_value_from_schema()` does not.
* There is no sanitization pass, so `sanitize_callback` never runs and
input reaches the execute callback uncoerced.
Custom validation belongs in the `wp_ability_validate_input` /
`wp_ability_validate_output` filters. Test-only change.
`arg_options` is intentionally not covered here: it is a registration-time
helper for `rest_get_endpoint_args_for_schema()` with no runtime meaning
for abilities.
Follow-up [61032], #64098.
See #64955.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/64955#comment:16>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list