validate_request
Validate a proposed request payload against the registered Zod schema for an operation, returning the exact canonical error envelope the HTTP surface would emit.
WHEN TO USE:
Before calling a write endpoint, to catch payload bugs locally.
Debugging 400 validation_error responses.
RETURNS:
valid: true when the payload would pass Zod validation.
When invalid, the canonical { error: { type, code, message, param, doc_url, details[] } } envelope is included under
error.
EXAMPLE: validate_request({ path: "/v1/data/query", method: "POST", payload: { dataset: "inference_outcomes", limit: 9999 } })
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Operation path (OpenAPI template form). | |
| method | Yes | ||
| payload | No | Shape is operation-dependent. GET → { query?, params? }. POST → body + optional { query?, params? }. |