AAI SDK
    Preparing search index...

    Type Alias ToolCallInfo

    Info about a tool call for display in the UI.

    type ToolCallInfo = {
        afterMessageId: number;
        args: Record<string, DefaultToolResult>;
        callId: string;
        name: string;
        result?: string;
        seq: number;
        status: "pending" | "done";
    }
    Index
    afterMessageId: number

    id of the last ChatMessage present when this tool call was inserted (-1 when there were none). The tool call renders immediately after that message; if the anchor message has slid out of the retained window, the tool call renders before all messages.

    args: Record<string, DefaultToolResult>

    The tool's arguments, as the model sent them.

    Values are DefaultToolResultany — for the same reason a tool result is: the shape is the author's own Zod schema, which the framework cannot see from here. As Record<string, unknown> the ordinary toolCall.args.url was a compile error in a client that runs correctly, and the escape hatch agents reached for next (args as FetchJsonArgs) is itself an error — TypeScript rejects the cast as insufficiently overlapping. That pair cost two build rounds in one run.

    Annotate at the read site for real checking: const { url } = toolCall.args as { url: string } is still available, and now actually compiles.

    callId: string
    name: string
    result?: string
    seq: number

    Monotonically increasing, session-unique insertion sequence number. Tool calls in a snapshot are always sorted ascending by seq.

    status: "pending" | "done"