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 ToolCall

One recorded tool call.

Attributes
idstring
toolNamestring

The name policy judges it by: dotted (gmail.send_email_message), or a capability's own (search, fetch, an agent's too).

toolTypestring | null
operationstring | null
statusstring | null
errorstring | null
argumentsJsonObject
resultPreviewstring | null
durationMsnumber | null
credentialIdstring | null
userIdstring | null
agentIdstring | null
conversationstring | null
executionIdstring | null
sourcestring | null

api, agent or mcp_server.

createdAtDate | null
rawJsonObject

The response JSON exactly as the API sent it.

mcpServerIdstring | null

The hosted MCP server an MCP client called it through (source mcp_server).

connectionstring | null

The connection it ran on, as the account names it (a named connection's name, else its name in the app).

Types
type JsonObject = { [key: string]: unknown };

liststatic

static list(options?: ToolCallFilters & { limit?: number }): Promise<ToolCall[]>

Every matching call (or the first limit).

Parameters
options.agentstring | ApiObject

An Agent or agent id: its turns' calls.

options.toolstring

A tool name or a * pattern (gmail.*), dotted or wire form.

options.status"success" | "error"
options.source"api" | "agent" | "mcp_server"

api: your own calls; agent: your agents' turns; mcp_server: MCP clients' calls through your hosted servers.

options.sinceDate | string
options.untilDate | string
options.limitnumber

Return at most this many.

options.userFilterUserFilter

Which users the read covers (user_id query), instead of acting as one (user).

options.userUserOption

undefined = the ambient user (asUser), null = the account itself.

(defaults to the current user)
options.clientNoClick

The client to send with; defaults to the module client built from NOCLICK_API_KEY.

Returns

Every matching call, newest first, fetched page by page.

Types
/**
 * Which users a read covers: `ALL_USERS`, `NO_USER`, a `User` or your id for one. Sent as the
 * `user_id` query parameter, never as the `NoClick-User` header, so it filters without acting as the user.
 */
type UserFilter = typeof ALL_USERS | typeof NO_USER | UserRef;

/** A `User` or your own id for the user. */
type UserRef = string | UserLike;

/** Anything that can name a user lazily (a `User`). */
interface UserLike {
  _userId(): Promise<string>;
}

/** `undefined` = the ambient user (from `asUser`), `null` = the account itself. */
type UserOption = UserRef | null | undefined;

listPagestatic

static listPage(
  options?: ToolCallFilters & PageOptions,
): Promise<Page<ToolCall>>

One page of matching calls; pass nextCursor back as cursor.

Parameters
options.cursorstring | null

The next_cursor of the page before; omit it for the first page.

options.limitnumber

Return at most this many.

options.agentstring | ApiObject

An Agent or agent id: its turns' calls.

options.toolstring

A tool name or a * pattern (gmail.*), dotted or wire form.

options.status"success" | "error"
options.source"api" | "agent" | "mcp_server"

api: your own calls; agent: your agents' turns; mcp_server: MCP clients' calls through your hosted servers.

options.sinceDate | string
options.untilDate | string
options.userFilterUserFilter

Which users the read covers (user_id query), instead of acting as one (user).

options.userUserOption

undefined = the ambient user (asUser), null = the account itself.

(defaults to the current user)
options.clientNoClick

The client to send with; defaults to the module client built from NOCLICK_API_KEY.

Returns

A page whose data holds up to limit calls (at most 200) and whose next_cursor is None on the last page.

Types
/**
 * Which users a read covers: `ALL_USERS`, `NO_USER`, a `User` or your id for one. Sent as the
 * `user_id` query parameter, never as the `NoClick-User` header, so it filters without acting as the user.
 */
type UserFilter = typeof ALL_USERS | typeof NO_USER | UserRef;

/** A `User` or your own id for the user. */
type UserRef = string | UserLike;

/** Anything that can name a user lazily (a `User`). */
interface UserLike {
  _userId(): Promise<string>;
}

/** `undefined` = the ambient user (from `asUser`), `null` = the account itself. */
type UserOption = UserRef | null | undefined;

summarystatic

static summary(options?: ToolCallFilters): Promise<ToolCallSummary>

How many calls match, and how many of them errored.

Parameters
options.agentstring | ApiObject

An Agent or agent id: its turns' calls.

options.toolstring

A tool name or a * pattern (gmail.*), dotted or wire form.

options.status"success" | "error"
options.source"api" | "agent" | "mcp_server"

api: your own calls; agent: your agents' turns; mcp_server: MCP clients' calls through your hosted servers.

options.sinceDate | string
options.untilDate | string
options.userFilterUserFilter

Which users the read covers (user_id query), instead of acting as one (user).

options.userUserOption

undefined = the ambient user (asUser), null = the account itself.

(defaults to the current user)
options.clientNoClick

The client to send with; defaults to the module client built from NOCLICK_API_KEY.

Returns

The total, split into success and error.

Types
/**
 * Which users a read covers: `ALL_USERS`, `NO_USER`, a `User` or your id for one. Sent as the
 * `user_id` query parameter, never as the `NoClick-User` header, so it filters without acting as the user.
 */
type UserFilter = typeof ALL_USERS | typeof NO_USER | UserRef;

/** A `User` or your own id for the user. */
type UserRef = string | UserLike;

/** Anything that can name a user lazily (a `User`). */
interface UserLike {
  _userId(): Promise<string>;
}

/** `undefined` = the ambient user (from `asUser`), `null` = the account itself. */
type UserOption = UserRef | null | undefined;

ToolCallSummary

interface ToolCallSummary

How many calls match, and how many of them errored.

Attributes
totalnumber
successnumber
errornumber
rawJsonObject

The response JSON exactly as the API sent it.

Types
type JsonObject = { [key: string]: unknown };