Skip to main content

Type Alias: JsonSchemaProperty

JsonSchemaProperty = { description?: string; items?: unknown; type: JsonSchemaPrimitiveType | JsonSchemaPrimitiveType[]; } | { anyOf?: unknown[]; description?: string; oneOf?: unknown[]; }

Defined in: types.ts:18

A single JSON Schema property descriptor as emitted for a tool's inputSchema. Only the subset of JSON Schema the generator produces is modelled here; the value is forwarded verbatim over the MCP wire protocol.

A property with OpenAPI oneOf/anyOf is forwarded as-is (no type) so a client-side validator enforces the same alternatives the REST API does, rather than collapsing to a single guessed primitive. type may be an array of two entries (e.g. ['string', 'null']) to represent an OpenAPI nullable: true property without losing its declared type.