Skip to main content

shape_to_json_schema

Function shape_to_json_schema 

Source
pub fn shape_to_json_schema(
    cx: &mut Cx,
    shape: Option<&ShapeRef>,
) -> Result<Expr>
Expand description

Converts a SIM shape into a JSON-Schema Expr map for MCP clients.

A missing shape maps to the permissive empty schema; core scalar shapes map to their JSON-Schema type, and other shapes are carried through an x-sim-shape extension key.