Skip to content
1 min read · 65 words

Type Alias: ToolCallRetrievalFn

ts
type ToolCallRetrievalFn = (
  ctx: TurnContext,
) => ToolCall[] | Promise<ToolCall[]>;

A function that retrieves the tool call records relevant to the current turn.

Parameters

ParameterType
ctxTurnContext

Returns

| ToolCall[] | Promise<ToolCall[]>

Remarks

Receives the active TurnContext so implementations can filter by completion state, agent identity, or any other turn-specific criteria. May be synchronous or asynchronous.