ToolCall.Emit.Schema (ToolCall v0.4.0)

Copy Markdown

JSON Schema rendering shared by the provider emitters.

Emits a conservative subset both providers accept: no $id, no external $ref, no oneOf. A recursive type is rendered once per tool under $defs, beside properties, and referenced by {"$ref": "#/$defs/<name>"}. Strict mode applies the same rules to a definition as to a nested object. A field's description, when present, is rendered beside its type. See the Recursive types section of docs/design.md and the target matrix in docs/projection.md.

Summary

Functions

Renders the parameters/input_schema object for a tool.

Renders a single type node.

Functions

params(tool, opts \\ [])

@spec params(ToolCall.IR.Tool.t(), keyword()) :: map()

Renders the parameters/input_schema object for a tool.

type(type, opts \\ [])

@spec type(ToolCall.IR.Type.t(), keyword()) :: map()

Renders a single type node.