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

ToolCallHookContext

Interface: ToolCallHookContext

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

Context provided to tool call hooks (onBeforeToolCall / onAfterToolCall).

Properties

args

ts
args: unknown;
args: unknown;

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

Parsed arguments for the tool call


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:138

The resolved tool definition, if found


toolCall

ts
toolCall: ToolCall;
toolCall: ToolCall;

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

The tool call being executed


toolCallId

ts
toolCallId: string;
toolCallId: string;

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

ID of the tool call


toolName

ts
toolName: string;
toolName: string;

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

Name of the tool