get_rest_route_schema
Read a REST route's argument contract on this site — every argument with its type and whether it is required.
Describe a REST API route on THIS site (core or any plugin) from its self-declared schema: every argument with its type, description and whether it is REQUIRED. Build with AI runs this before building an internal automation — a webhook whose endpoint points at your own wp-json — so required fields (e.g. POST /wp/v2/users needs username, email AND password, which field mapping alone cannot always supply) are satisfied with a Code Glue snippet, or called out honestly, instead of guessed. Internal routes only — it cannot describe external APIs. Registered as the WordPress Ability flowsystems-webhook-actions/get_rest_route_schema, so external AI tools (Claude Code, Cursor) can call it over MCP or REST with a scoped API token.
/ Plan step shape
{ "ability": "get_rest_route_schema", "input": { "route": …, "method": … } }
/ Scope & confirmation
Minimum API-token scope for external (MCP/REST) callers: read. Read-only — the agent runs it freely while planning.
/ Input fields
| Name | In | Type | Req | Description |
|---|---|---|---|---|
| route | param | string | yes | Route path relative to /wp-json, e.g. "/wp/v2/users". A full URL to this site's REST API is also accepted. |
| method | param | string | — | HTTP method you plan to use — GET, POST (default), PUT, PATCH or DELETE. |
/ Examples
Plan step as Build with AI proposes it
{ "id": "step_1", "ability": "get_rest_route_schema", "summary": "…", "input": { "route": "/wp/v2/users", "method": "POST" } }
/ Related