List a session's tool calls
Read every tool call of a session, newest first, one page at a time, with each one's executionId.
/api/v1/sessions/:sessionId/tool-callsconst response = await fetch("https://api.smallworld.sh/api/v1/sessions/01995e57-0501-76b8-b797-5b24df5b307f/tool-calls?limit=20", {
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.
Path parameters#
sessionIdUUIDrequiredThe session ID returned in session.id.
Query parameters#
cursorstringThe opaque nextCursor from a previous page of this same list and session. Omit for the first page.
limitintegerNumber of items to return, from 1 to 50. Defaults to 20.
Responses#
Returns items and nextCursor. Each item is a tool call as GET /tool-approvals returns it, with argumentsTruncated and resultTruncated. Arguments and results longer than 16 KB of JSON are returned as their JSON text cut to 16 KB, a string; a text result is cut as text.
{
"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": "completed",
"result": {
"orderId": "order_456",
"status": "shipped"
},
"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,
"argumentsTruncated": false,
"resultTruncated": false
}
],
"nextCursor": null
}
More about this endpoint
Items are newest first. Pass nextCursor to read older items; it is null on the final page.
A cursor works only for the list and session that returned it.
GET /executions/:executionId returns the full arguments and results of its tool calls.