Skip to content

Type Alias: ToolExecutor()

@providerprotocol/agents


@providerprotocol/agents / index / ToolExecutor

ToolExecutor = (call, tool) => Promise<unknown>

Defined in: src/execution/tool-ordering.ts:300

Function type for executing a single tool call.

Implementations receive the tool call and tool definition, and should return the result (or throw on error).

ToolCall

The tool call to execute

Tool

The tool definition

Promise<unknown>

Promise resolving to the tool result