MCP tool schema and result contract
tools/list returns each operation’s current schema. For example, native mode describes wp_get_post as:
{
"tools": [
{
"name": "wp_get_post",
"description": "…",
"inputSchema": {
"type": "object",
"properties": {"id": {"type": "integer"}},
"required": ["id"]
}
}
]
}
The public list exposes the MCP name, description and input schema. Native mode also supplies read-only, destructive and idempotence hints. These are descriptive hints, never permission grants; the server enforces scopes, capabilities and write gates independently.
Call a tool with:
{
"method": "tools/call",
"params": {
"name": "wp_get_post",
"arguments": {
"id": 123
}
}
}
Required input fields are validated before the callback. The standard transport normalizes common string forms of dry_run; native mode requires a JSON boolean.
On success, the JSON-RPC result contains content with a JSON text item and isError: false. The standard transport pretty-prints that JSON. Native mode also returns structuredContent with the same tool-specific data; prefer that object when present. Do not depend on JSON whitespace.
In standard mode, domain errors are JSON-RPC errors. Native tool execution errors use isError: true; protocol errors remain JSON-RPC errors. Do not parse an error message as a successful tool result.
Tool availability is runtime-dependent. Use exact discovered names and do not assume similarly named aliases.
Rediscover input and output schemas after reconnecting. A familiar tool name alone does not establish compatibility with a different connection implementation. If a connection returns MCP structuredContent, read that object directly; otherwise decode the documented text result. Check isError before treating either representation as successful data.
Related guides: error contract, read versus write, and tool reference chapters.
Native site identity and validation
pom_get_site_context returns contract_version: 2, the WordPress version and a site object containing site_id, site_url and blog_id. Existing tool calls do not require a new identifier. They optionally accept site_id to confirm they target the discovered site; a mismatch is rejected. The identifier is not a credential, and execution always remains scoped to the connection’s site.
Native mode validates described property types and required arguments through WordPress Abilities API. Undescribed extra fields remain accepted for compatibility; operation callbacks only use their supported fields. Batch tools retain their domain validation and partial-result behavior. Inspect nested results as well as the top-level isError; a successful batch envelope does not establish that every row succeeded.
Output schemas are not imposed on the variable legacy payloads. Output validation cannot undo an already completed mutation. After a timeout or ambiguous result, read the target before retrying a write.