Validate
Validate rejects a payload that doesn't conform to a schema or type, before it reaches an AI agent or an upstream MCP server or HTTP API. It's built on two primitives Zilla already uses to govern data everywhere in a config, not something specific to any one AI Gateway binding:
- Schema Registry defines where a schema lives: embedded in
zilla.yaml, read from the local filesystem, or fetched from a remote schema registry. - Schema Enforcement defines the type or schema a payload is checked against, from primitives like
stringandint32to schema-backed formats likeavro,json, andprotobuf.
Validating Tool Call Arguments on mcp proxy
The mcp proxy binding's options.tools field validates tools/call request arguments directly against a primitive model, before the call is routed to an upstream:
options:
tools: jsonSee the mcp proxy reference for the full set of supported primitive models.
Validating Tool Arguments and Responses on mcp-http
The mcp-http proxy binding validates both directions of a tool call: schemas.input checks the tools/call arguments before the upstream HTTP request is dispatched, and schemas.output checks the upstream HTTP response before it's surfaced as the tool result. Each is a converter binding a model to a catalog subject:
options:
tools:
create_pr:
schemas:
input:
model: json
catalog:
my_catalog:
- subject: create_pr_params
version: latest
output:
model: json
catalog:
my_catalog:
- subject: create_pr_result
version: latestA tools/call whose arguments don't conform to the resolved schema is rejected before the upstream request is made; an upstream response that doesn't conform to the output schema is rejected before it reaches the agent. mcp-http resources support the same schemas.output converter on resources/read. See the mcp-http reference for the full shape.
Validating HTTP Traffic Directly
Where a plain http binding fronts or proxies AI Gateway traffic outside of mcp/mcp-http, it accepts a model on request and response content, headers, path, and query parameters, using the same primitive model names:
options:
requests:
- path: /tools/call
method: POST
content:
model: json
responses:
- status: 200
content:
model: jsonSee the http server and http client reference for the full set of options, including headers, path, and query validation.
Validating Against a Registered Schema
Wherever Zilla accepts a schema-backed model (avro, json, or protobuf), pairing it with a catalog validates against a schema resolved by subject, topic, or ID, rather than a fixed primitive type. Kafka Gateway's Validate uses exactly this pairing to validate Kafka message keys and values against a schema fetched from a registry, and mcp-http's schemas.input/schemas.output above use the identical model/catalog shape:
value:
model: avro
catalog:
schema_registry:
- strategy: topicNext Steps
- Schema Registry covers each catalog type and when to use it.
- Schema Enforcement covers each model type, from primitives to schema-backed formats.
- Transform covers transforming a payload's representation once it's validated.

