Skip to content

Interface: ToolExecution

@providerprotocol/ai


@providerprotocol/ai / @providerprotocol/ai / ToolExecution

Defined in: src/types/tool.ts:327

Record of a completed tool execution.

Contains all information about a tool call that was executed, including timing and result data.

const execution: ToolExecution = {
toolName: 'get_weather',
toolCallId: 'call_abc123',
arguments: { location: 'San Francisco' },
result: { temperature: 72 },
isError: false,
duration: 150,
approved: true
};

optional approved: boolean

Defined in: src/types/tool.ts:347

Whether approval was required and granted (undefined if no approval handler)


arguments: Record<string, unknown>

Defined in: src/types/tool.ts:335

Arguments that were passed to the tool


duration: number

Defined in: src/types/tool.ts:344

Execution duration in milliseconds


isError: boolean

Defined in: src/types/tool.ts:341

Whether the tool execution resulted in an error


result: unknown

Defined in: src/types/tool.ts:338

Result returned by the tool


toolCallId: string

Defined in: src/types/tool.ts:332

Unique identifier for this tool call


toolName: string

Defined in: src/types/tool.ts:329

Name of the tool that was called