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

AfterToolCallInfo

Interface: AfterToolCallInfo

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

Outcome information provided to onAfterToolCall.

Properties

duration

ts
duration: number;
duration: number;

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

Duration of tool execution in milliseconds


error?

ts
optional error: unknown;
optional error: unknown;

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


ok

ts
ok: boolean;
ok: boolean;

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

Whether the execution succeeded


result?

ts
optional result: unknown;
optional result: unknown;

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

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


tool

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

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

The resolved tool definition


toolCall

ts
toolCall: ToolCall;
toolCall: ToolCall;

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

The tool call that was executed


toolCallId

ts
toolCallId: string;
toolCallId: string;

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

ID of the tool call


toolName

ts
toolName: string;
toolName: string;

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

Name of the tool