pub async fn call_tool<Ctx: Send + Sync + 'static>(
tool: Arc<dyn ToolFunction<Ctx>>,
tool_args: Value,
tool_context: Arc<ToolExecutionContext<Ctx>>,
) -> Result<ToolResult, AgentError>Expand description
Validate tool arguments against its JSON schema and then execute it.
This is the canonical entry-point for invoking a ToolFunction from the
agent runtime. It first checks schema conformance with jsonschema, then
calls ToolFunction::execute.