checkToolCall(...) after the provider returns a tool call and before your application executes that call.
allow and block.
If Averta blocks the tool call, do not execute the tool.Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Evaluate model-requested tool calls before your app executes them.
checkToolCall(...) after the provider returns a tool call and before your application executes that call.
const decision = await client.checkToolCall({
callId: "call_123",
runId: "run_123",
provider: {
name: "custom-provider",
operation: "messages.create",
model: "model-name",
},
tool: {
kind: "function",
name: "send_email",
},
arguments: {
value: {
to: "customer@example.com",
subject: "Password reset",
},
},
modelResponseToolCalls: [
{
callId: "call_123",
tool: {
kind: "function",
name: "send_email",
},
},
],
context: {
messages: [
{
role: "user",
text: "Email the customer about password reset.",
},
],
},
});
allow and block.
If Averta blocks the tool call, do not execute the tool.