Deny a tool call
Deny the exact pending invocation before it reaches the provider.
/api/v1/tool-approvals/:id/denyUse the pending tool call’s id, not the execution ID. After this decision, read the execution using the returned executionId.
const response = await fetch("https://api.smallworld.sh/api/v1/tool-approvals/b5212df0-ea8b-4eb8-a7b1-057ff45b3044/deny", {
method: "POST",
headers: { Authorization: `Bearer ${apiKey}`, "Content-Type": "application/json" },
body: JSON.stringify({}),
});
if (!response.ok) throw new Error(`HTTP ${response.status}: ${await response.text()}`);
const result = await response.json();
Use your server-side apiKey. Replace the example IDs.
Path parameters#
idUUIDrequiredThe pending tool-call ID from toolCalls or the tool-approvals list.
Responses#
The invocation was denied before provider dispatch. The script receives a tool error and may handle it or finish with an error.
{
"id": "b5212df0-ea8b-4eb8-a7b1-057ff45b3044",
"sessionId": "01995e57-0501-76b8-b797-5b24df5b307f",
"executionId": "01995e57-3027-7557-a233-009ea3dcd8fc",
"userId": "customer_123",
"worldId": "01995e56-e2d4-7f19-b691-7bf9af6abdc8",
"integration": "acme",
"integrationName": "Acme",
"account": null,
"connectionSource": "none",
"group": null,
"toolName": "get_order",
"toolDescription": "Read an order by its ID.",
"toolLabel": "read",
"arguments": {
"orderId": "order_456"
},
"status": "denied",
"result": null,
"error": "Tool call denied",
"errorCode": null,
"reason": null,
"providerApproval": null,
"hooks": [],
"createdAt": "2026-10-10T12:00:00.000Z",
"expiresAt": "2026-10-10T12:15:00.000Z",
"completedAt": "2026-10-10T12:00:01.000Z",
"decidedAt": "2026-10-10T12:00:01.000Z"
}
More about this endpoint
Omit the body or send {}. remember: true is not supported for denial, and arguments cannot be edited.
Use this endpoint while providerApproval is null or absent. When the provider asks for a decision, render its offered choices and submit the selected value through the provider decision endpoint.
Denial becomes a tool error inside the command. The script may handle it and continue; poll the execution to observe the outcome.
Repeating the same denial does not invoke the provider.