Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Validate ¶
Validate clones value, applies the same primitive coercions used by upstream tool validation, and validates the converted value against schema.
func ValidateToolArguments ¶
ValidateToolArguments formats failures like the upstream TypeBox adapter so loop-generated error tool results remain trace-compatible.
func ValidateToolArgumentsJSON ¶
ValidateToolArgumentsJSON preserves the provider's argument member order in the diagnostic's pretty-printed input. Callers with a retained raw tool call should prefer this form over re-encoding its arguments map.
Types ¶
type Schema ¶
type Schema json.RawMessage
Schema contains a JSON Schema value without imposing a Go-side schema model. The zero value is the valid unconstrained schema {}.
func FromStruct ¶
FromStruct derives a plain, inline JSON Schema from T. Fields are required unless their json tag contains omitempty/omitzero or their jsonschema tag contains optional. Supported jsonschema directives are description, enum, required, and optional.
func StringEnum ¶
StringEnum builds the enum form accepted by Google and the other providers: {"type":"string","enum":[...]}.
func (Schema) MarshalJSON ¶
MarshalJSON returns the stored schema bytes unchanged.
func (*Schema) UnmarshalJSON ¶
UnmarshalJSON retains the input representation so schemas received from JS extensions or MCP can pass through without a Go-side rewrite.
type ValidationErrors ¶
type ValidationErrors []ValidationIssue
func (ValidationErrors) Error ¶
func (errors ValidationErrors) Error() string