validate_tool_use

Function validate_tool_use 

Source
pub fn validate_tool_use(
    tool_use: &ToolUse,
    registered_tools: &HashSet<String>,
) -> Result<(), StrandsError>
Expand description

Validates a tool use request against registered tools.

Checks that the tool use references a valid, registered tool and that the input parameters are appropriate.

§Arguments

  • tool_use - The tool use request to validate
  • registered_tools - Names of registered tools

§Returns

Ok(()) if the tool use is valid.