Skip to main content

Module json_schema

Module json_schema 

Source
Expand description

Conversion of the endpoint Type model into JSON Schema, as required by MCP (Model Context Protocol) tool definitions (inputSchema / outputSchema).

The conversion is a pure function over Type; StructRef/EnumRef/ StructTable references are resolved through a caller-provided TypeRegistry and emitted as $ref entries under $defs.

Structs§

TypeRegistry
Name → Type map used to resolve StructRef, EnumRef and StructTable while converting to JSON Schema.