Skip to content
Source
Sign inSign up
TanStack/ai
Open History to see the last commit

AfterToolCallInfo.md

106 lines2.5 KB

Interface: AfterToolCallInfo

Defined in: packages/typescript/ai/src/activities/chat/middleware/types.ts:194

Outcome information provided to onAfterToolCall.

Properties

duration

duration: number;

Defined in: packages/typescript/ai/src/activities/chat/middleware/types.ts:206

Duration of tool execution in milliseconds


error?

optional error: unknown;

Defined in: packages/typescript/ai/src/activities/chat/middleware/types.ts:209


ok

ok: boolean;

Defined in: packages/typescript/ai/src/activities/chat/middleware/types.ts:204

Whether the execution succeeded


result?

optional result: unknown;

Defined in: packages/typescript/ai/src/activities/chat/middleware/types.ts:208

The result (if ok) or error (if not ok)


tool

tool: 
  | Tool<SchemaInput, SchemaInput, string>
  | undefined;

Defined in: packages/typescript/ai/src/activities/chat/middleware/types.ts:198

The resolved tool definition


toolCall

toolCall: ToolCall;

Defined in: packages/typescript/ai/src/activities/chat/middleware/types.ts:196

The tool call that was executed


toolCallId

toolCallId: string;

Defined in: packages/typescript/ai/src/activities/chat/middleware/types.ts:202

ID of the tool call


toolName

toolName: string;

Defined in: packages/typescript/ai/src/activities/chat/middleware/types.ts:200

Name of the tool