ToolCall
Tool calls: every integration run, capability call and agent tool call your platform work made, newest first.
page = noclick.ToolCall.list_page(tool="gmail.*", status="error", user_filter=noclick.ALL_USERS)class ToolCallOne recorded tool call. tool_name is the name policy judges it by: dotted
(gmail.send_email_message), or a capability's own (search, fetch, an agent's too).
source is api (your own calls), agent (your agents' turns) or
mcp_server (an MCP client's, through the hosted server mcp_server_id).
| id | str | |
| tool_name | str | |
| tool_type | str | None | |
| operation | str | None | |
| status | str | None | |
| error | str | None | |
| arguments | dict[str, Any] | |
| result_preview | str | None | |
| duration_ms | int | None | |
| credential_id | str | None | |
| user_id | str | None | |
| agent_id | str | None | |
| conversation | str | None | |
| execution_id | str | None | |
| source | str | None | |
| created_at | Any | |
| raw | dict[str, Any] | The response JSON exactly as the API sent it. |
| mcp_server_id | str | None |
listclassmethodasync
noclick.ToolCall.list(
*, agent=None, tool=None, status=None, source=None, since=None, until=None,
limit=None, user_filter=None, user=..., client=None
) -> list[ToolCall]Every matching call (or the first limit). tool is a name or a
* pattern (gmail.*); status success/error;
source api (your calls), agent (your agents' turns) or
mcp_server (MCP clients' calls through your hosted servers).
NoneNoneNoneNoneNoneNoneReturn at most this many.
None)Which users a read covers: noclick.ALL_USERS, noclick.NO_USER, a User, or your id for one. It filters without acting as that user.
None)Who the call acts for. Defaults to the user set by noclick.as_user (none: the account itself).
The client to send with; defaults to the module client built from NOCLICK_API_KEY.
None)Every matching call, newest first, fetched page by page.
See which Gmail calls your agents got wrong in the last day:
from datetime import datetime, timedelta, timezone
yesterday = datetime.now(timezone.utc) - timedelta(days=1)
for call in noclick.ToolCall.list(tool="gmail.*", status="error", source="agent", since=yesterday):
print(call.tool_name, call.error)Or one agent's calls, across every user:
support = noclick.Agent.from_name("support")
calls = noclick.ToolCall.list(agent=support, user_filter=noclick.ALL_USERS, limit=50)Or what MCP clients did through a user's hosted server:
server = noclick.McpServer.from_name("crm-tools", user="acme")
for call in noclick.ToolCall.list(source="mcp_server", user="acme", limit=50):
if call.mcp_server_id == server.id:
print(call.tool_name, call.status, call.created_at)list_pageclassmethodasync
noclick.ToolCall.list_page(
*, cursor=None, limit=None, agent=None, tool=None, status=None, source=None,
since=None, until=None, user_filter=None, user=..., client=None
) -> PageOne page of matching calls; pass next_cursor back as cursor.
The next_cursor of the page before; omit it for the first page.
None)Return at most this many.
None)NoneNoneNoneNoneNoneNoneWhich users a read covers: noclick.ALL_USERS, noclick.NO_USER, a User, or your id for one. It filters without acting as that user.
None)Who the call acts for. Defaults to the user set by noclick.as_user (none: the account itself).
The client to send with; defaults to the module client built from NOCLICK_API_KEY.
None)A page whose data holds up to limit calls (at most 200) and whose next_cursor
is None on the last page.
page = noclick.ToolCall.list_page(status="error", limit=200)
while True:
for call in page.data:
print(call.tool_name, call.error)
if page.next_cursor is None:
break
page = noclick.ToolCall.list_page(status="error", limit=200, cursor=page.next_cursor)summaryclassmethodasync
noclick.ToolCall.summary(
*, agent=None, tool=None, status=None, source=None, since=None, until=None,
user_filter=None, user=..., client=None
) -> ToolCallSummaryHow many calls match the same filters, and how many errored.
NoneNoneNoneNoneNoneNoneWhich users a read covers: noclick.ALL_USERS, noclick.NO_USER, a User, or your id for one. It filters without acting as that user.
None)Who the call acts for. Defaults to the user set by noclick.as_user (none: the account itself).
The client to send with; defaults to the module client built from NOCLICK_API_KEY.
None)The total, split into success and error.
from datetime import datetime, timedelta, timezone
yesterday = datetime.now(timezone.utc) - timedelta(days=1)
counts = noclick.ToolCall.summary(tool="gmail.*", since=yesterday)
print(counts.total, counts.success, counts.error)ToolCallSummary
class ToolCallSummaryHow many calls match, and how many of them errored.
| total | int | |
| success | int | |
| error | int | |
| raw | dict[str, Any] | The response JSON exactly as the API sent it. |