Docs
CodeRabbit
Cloudflare
AG Grid
SerpAPI
Netlify
OpenRouter
Neon
WorkOS
Clerk
Electric
PowerSync
Sentry
Railway
Prisma
Strapi
Unkey
CodeRabbit
Cloudflare
AG Grid
SerpAPI
Netlify
OpenRouter
Neon
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:123

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

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

The resolved tool definition, if found


toolCall

ts
toolCall: ToolCall;
toolCall: ToolCall;

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

The tool call being executed


toolCallId

ts
toolCallId: string;
toolCallId: string;

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

ID of the tool call


toolName

ts
toolName: string;
toolName: string;

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

Name of the tool