Skip to main content

validate_tool_args

Function validate_tool_args 

Source
pub fn validate_tool_args(schema: &Value, args: &Value) -> Result<()>
Expand description

Validate tool arguments against a JSON Schema.

Returns Ok(()) if args are valid, or Err with a human-readable description of what failed. Extra/unknown fields are permitted — LLMs often include them and tools should be lenient on input.