pub async fn execute_single_tool(
tool: Option<&dyn Tool>,
call: &ToolCall,
state: &Value,
) -> ToolExecutionExpand description
Execute a single tool call.
This function:
- Creates a Context from the state snapshot
- Executes the tool
- Extracts any state changes as a TrackedPatch
ยงArguments
tool- The tool to execute (or None if not found)call- The tool call with id, name, and argumentsstate- The current state snapshot (read-only)