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.",
},
],
},
});