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

ToolCallHookContext

Interface: ToolCallHookContext

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

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

Properties

args

ts
args: unknown;
args: unknown;

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

Parsed arguments for the tool call


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

The resolved tool definition, if found


toolCall

ts
toolCall: ToolCall;
toolCall: ToolCall;

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

The tool call being executed


toolCallId

ts
toolCallId: string;
toolCallId: string;

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

ID of the tool call


toolName

ts
toolName: string;
toolName: string;

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

Name of the tool