Skip to main content

run_tool_call

Function run_tool_call 

Source
pub async fn run_tool_call(
    scope: &ToolCallScope<'_>,
    call: ToolCall,
    hooks: &dyn AgentHooks,
    updates: UpdateSink,
) -> ToolCallOutcome
Expand description

Runs one call outside the loop’s batches, as pi’s runToolCall does: it prepares and validates the call, passes it through the hooks and executes it in scope. Failures come back as error results. Emits no events: updates receives the tool’s partial results.