Skip to content
List tool approvals

List tool approvals

List pending approvals or tool-call history, optionally scoped to a session or execution.

GET/api/v1/tool-approvals

Request#

TypeScript
const response = await fetch("https://api.smallworld.sh/api/v1/tool-approvals?executionId=01995e57-3027-7557-a233-009ea3dcd8fc", {
  method: "GET",
  headers: { Authorization: `Bearer ${apiKey}` },
});
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.

Query parameters#

sessionIdUUID

Limit results to this session. An unknown session returns 404.

executionIdUUID

Limit results to this execution. An unknown execution returns 404.

pendingOnlyboolean

true returns pending calls only; false includes history. Defaults to true. Pass the string true or false in the URL.

Responses#

Calls that end without a result
StatusWhen, and the saved error
deniedA person denied the call.Tool call denied
deniedThe tool's policy denied the call when it was made.Tool call denied by policy
deniedA tool call hook answered deny. When it gave a reason, the error reads Tool call denied by hook: <reason>.Tool call denied by hook · errorCode hook_denied
deniedA tool call hook timed out, couldn't be reached, answered with a non-2xx status, or sent an invalid answer. The call's reason says which.Tool call denied: the hook gave no valid answer · errorCode hook_unavailable
expiredNobody approved or denied the call before its approval deadline.Approval expired
expiredA person approved the call in time, but the command only continued after the call's approval deadline, for example because the API was restarting.The call was approved, but its deadline passed before the command could continue, so it didn't run
expiredA decision arrived after the approval deadline had passed.The approval had already expired when the decision arrived
interruptedThe command ended while the call waited for approval or to start.The command ended before this tool call could run
unknownThe command ended while the provider was handling the call. Check the provider before retrying a write.Execution ended while the provider call was in flight; its outcome may be unknown
interruptedThe command's result couldn't be saved, so the execution ended with the code execution_result_not_saved.Execution ended without a saved result; submit a new command
interruptedThe command waited for this approval long enough to be set aside, and when it resumed after the decision it no longer reached this call the same way.The command behaved differently when it resumed, so this call was not run. · errorCode execution_replay_diverged
interruptedThe API restarted while the call waited for approval or to start.API restarted; submit a new command
unknownThe API restarted while the provider was handling the call.API restarted during a provider call; verify the remote result before retrying
interruptedSomeone edited or deleted the mount while the command that changed it was running or waiting for approval.The mount was changed or deleted, so these changes were discarded
interruptedA move to another group, or another mount's path, took the mount away from the user's session while its changes waited.The user no longer has this mount, so these changes were discarded
interruptedA command that hit its active-time limit changed a mount whose changes needed approval.The command timed out, so these changes couldn't wait for approval and were discarded
interruptedThe integration was turned off for the workspace while the call waited for approval.The integration was turned off while this tool call was waiting for approval. · errorCode integration_disabled
interruptedThe integration was turned off for the call's World while it waited for approval.The integration was turned off for this World while this tool call was waiting for approval. · errorCode integration_disabled
interruptedThe integration was turned off for the group the call's session acts for while it waited for approval.The integration was turned off for the session's group while this tool call was waiting for approval. · errorCode integration_disabled
interruptedA custom or MCP server integration was edited or removed while the call waited for approval.The integration was edited or removed while this tool call was waiting for approval. · errorCode integration_changed
interruptedThe user or the session's group reconnected or disconnected the integration, or the user connected an account of their own, while the call waited for approval.The connection to the integration changed or was removed while this tool call was waiting for approval. · errorCode integration_connection_stale
interruptedThe provider rejected the user's or the session's group's credentials while the call waited for approval.The integration rejected the connection while this tool call was waiting for approval. The user or the session's group needs to connect again. · errorCode integration_reauth_required
interruptedThe call used the group's connection, and the user was moved to another group while the call waited for approval.The user's group changed while this tool call was waiting for approval, so the group's connection no longer applies. · errorCode integration_connection_stale
interruptedThe user left the group the session acts for, or that group was deleted, while the call waited for approval.The session was closed while this tool call was waiting for approval, because the user left the session's group or the group was deleted. · errorCode session_closed

Other calls end failed with the integration’s own error and code, such as integration_not_connected or a custom endpoint’s code.

A recorded invocation is awaiting the user's decision. This is the default pendingOnly=true result.

200 response
{
  "items": [
    {
      "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": "pending",
      "result": null,
      "error": null,
      "errorCode": null,
      "reason": null,
      "providerApproval": null,
      "hooks": [],
      "createdAt": "2026-10-10T12:00:00.000Z",
      "expiresAt": "2026-10-10T12:15:00.000Z",
      "completedAt": null,
      "decidedAt": null
    }
  ]
}
More about this endpoint

Each approval identifies one invocation with its exact arguments. A single execution can produce multiple pending approvals.

A pending call with providerApproval is waiting for the provider's decision. Display its message, question, and every choice label, and submit the chosen value with its providerApproval.id. This prompt can follow a local approval on the same tool-call ID. Use the regular approve and deny endpoints when providerApproval is null or absent.

Tool approvals use the workspace's approval timeout: 15 minutes by default, configurable from 5 minutes to 1 month (30 days) in Settings → Terminal. Use each call's expiresAt to display its deadline. Approval waits pause the one-hour execution limit.

Changes to a mount whose setting is ask arrive here too, as one approval per changed mount at the end of the command: integration is mounts, integrationName is Mounts, toolName is the mount's ID, toolDescription is its path followed by its description, toolLabel is write or destructive, and arguments has the mount's path and its changes with diffs. A move between two mounts is one approval for both.