Docs
CodeRabbit
Cloudflare
AG Grid
SerpAPI
Netlify
OpenRouter
WorkOS
Clerk
Electric
PowerSync
Sentry
Railway
Prisma
Strapi
Unkey
CodeRabbit
Cloudflare
AG Grid
SerpAPI
Netlify
OpenRouter
WorkOS
Clerk
Electric
PowerSync
Sentry
Railway
Prisma
Strapi
Unkey
Class References
Function References
Interface References
Type Alias References
Variable References

AfterToolCallInfo

Interface: AfterToolCallInfo

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

Outcome information provided to onAfterToolCall.

Properties

duration

ts
duration: number;
duration: number;

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

Duration of tool execution in milliseconds


error?

ts
optional error: unknown;
optional error: unknown;

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


ok

ts
ok: boolean;
ok: boolean;

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

Whether the execution succeeded


result?

ts
optional result: unknown;
optional result: unknown;

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

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


tool

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

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

The resolved tool definition


toolCall

ts
toolCall: ToolCall;
toolCall: ToolCall;

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

The tool call that was executed


toolCallId

ts
toolCallId: string;
toolCallId: string;

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

ID of the tool call


toolName

ts
toolName: string;
toolName: string;

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

Name of the tool