Documentation
¶
Overview ¶
Package toolschema provides a lightweight, dependency-free validator for tool call inputs against a tool's declared JSON-Schema-like InputSchema.
It supports the common subset used by tool manifests: object types with required properties and additionalProperties control, arrays with item schemas and cardinality/uniqueness constraints, the primitive types (string, number, integer, boolean, null), union "type" arrays (e.g. ["string","null"]), enum membership, string length/pattern constraints, and numeric range/multipleOf constraints.
Anything the validator does not understand (unknown keywords, unknown type tokens, a malformed schema, or a malformed regex pattern) is treated as "no constraint" so a schema quirk never blocks a tool call that the executor could otherwise handle.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Validate ¶
func Validate(schema, input json.RawMessage) error
Validate reports whether input satisfies schema. An empty schema only requires that input (when present) is valid JSON. A malformed schema is a scenario configuration concern rather than a tool-input error, so it is treated as "no constraint".
Types ¶
This section is empty.