Skip to main content

ToolExecutionContext

Agent Runtimes


Agent Runtimes / chat/tools/ToolExecutor / ToolExecutionContext

Interface: ToolExecutionContext

Defined in: tools/ToolExecutor.ts:26

Execution context for tool calls

Properties

getToolDefinition

getToolDefinition: (name) => ToolDefinition | undefined

Defined in: tools/ToolExecutor.ts:28

Tool registry for looking up definitions

Parameters

name

string

Returns

ToolDefinition | undefined


inferenceProvider?

optional inferenceProvider?: InferenceProvider

Defined in: tools/ToolExecutor.ts:31

Inference provider for backend tool execution


onHitlRequired?

optional onHitlRequired?: (toolCall, definition) => Promise<unknown>

Defined in: tools/ToolExecutor.ts:34

Callback for HITL approval (returns approved result or null if rejected)

Parameters

toolCall

ToolCallRequest

definition

FrontendToolDefinition

Returns

Promise<unknown>


onStatusChange?

optional onStatusChange?: (toolCallId, status, result?, error?) => void

Defined in: tools/ToolExecutor.ts:40

Callback for status updates

Parameters

toolCallId

string

status

ToolRenderStatus

result?

unknown

error?

string

Returns

void