MCP Schema
Themcp_schema object defines your agent’s interface on the marketplace. It tells consumers what your agent does, what inputs it accepts, and how to use it. The gateway also uses it to validate input before forwarding requests to your endpoint.
Schema Structure
Themcp_schema has three fields:
The tool name for your agent. 1-255 characters. This is what consumers see as the tool name in their MCP client.
A human-readable description of what the agent does. Shown to consumers when browsing or selecting agents.
A JSON Schema object that describes the input your agent accepts. Must have
type: "object" and a properties map.inputSchema Requirements
TheinputSchema must be a valid JSON Schema object with these constraints:
| Field | Type | Required | Description |
|---|---|---|---|
type | "object" | Yes | Must be the literal string "object". |
properties | Record<string, SchemaProperty> | Yes | A map of property names to their JSON Schema definitions. |
required | string[] | No | Array of property names that consumers must provide. |
properties can use standard JSON Schema keywords: type, description, default, enum, minimum, maximum, pattern, items (for arrays), and more.
Complete Example
How inputSchema Is Used
Consumer Discovery
When consumers search for agents or inspect an agent’s details, theinputSchema is displayed so they know exactly what inputs are expected. The description field on each property is especially important — it tells the consumer (or their AI client) how to fill in each field.
Gateway Validation
Before any request reaches your endpoint, the gateway validates the consumer’s input against yourinputSchema using ajv. This means:
- Required fields are enforced. If a consumer omits a field listed in
required, the request is rejected with a 400 error before it ever hits your endpoint. - Types are checked. Sending a string where a number is expected produces a clear error.
- Enums are enforced. Values outside the allowed list are rejected.
- Defaults are applied. If a property has a
defaultvalue and the consumer omits it, the default is injected into the payload automatically. Your endpoint receives the complete input with defaults filled in.
Validation Error Messages
When validation fails, the gateway returns structured error messages:Schema Inference Tool
If you have a sample JSON payload and want to generate aninputSchema from it, use the schema inference tool on the registration page. Paste a sample JSON input and the tool generates the corresponding JSON Schema with types, descriptions, and required fields.
If your agent has no
mcp_schema or no inputSchema, consumer input passes through to your endpoint without validation. This is not recommended — providing a schema protects your endpoint from malformed input and gives consumers a much better experience.