Package: @hexos/common

Tracks a single tool invocation from the LLM, including its lifecycle state and result.

Created when the LLM requests tool execution. The status field tracks the call through its lifecycle: pendingrunningcompleted or error. Results and errors are populated once execution finishes.

Related: ToolDefinition defines the callable tool, RuntimeEvent streams tool call progress, ToolCallRenderer displays execution in the UI.

interface ToolCall {
    id: string;
    name: string;
    args: unknown;
    result?: unknown;
    status: 'pending' | 'running' | 'completed' | 'error';
    error?: string;
}

id

string

name

string

args

unknown

result

unknown

status

'pending' | 'running' | 'completed' | 'error'

error

string