Skip to main content

validate_tool_output

Function validate_tool_output 

Source
pub fn validate_tool_output(
    tool: &str,
    schema: &Value,
    output: &Value,
) -> Result<(), String>
Expand description

Validate a tool result against its declared return schema.

Return schemas are optional, so callers invoke this only when a schema is present. Keeping compilation and error formatting beside parameter-schema validation prevents callback transports from growing subtly different JSON Schema implementations.