Execute tools
List tools, run them as a user or account, read the response and inspect execution logs.
Once a user has a connected account, your agent can run any tool of that toolkit. This page covers listing tools, the execute request, the response envelope, error codes and the execution logs.
List and get tools
curl "https://<your-host>/api/v1/tools?toolkit=github,gmail&search=issue&tags=write" \
-H "Authorization: Bearer $API_KEY"
curl "https://<your-host>/api/v1/tools/GITHUB_CREATE_ISSUE" \
-H "Authorization: Bearer $API_KEY"Filters on the list are toolkit (up to 20 comma-separated slugs), search, tags and
include_deprecated. Each tool carries its input_schema and output_schema as plain JSON
Schema, the scopes it needs and whether it requires_connection. The same schemas generate the form
in the dashboard Playground.
The list is sorted by slug and paginated: limit (default 100, at most 200) and cursor. Pass the
next_cursor of a page as cursor to get the next one; it is null on the last page.
curl "https://<your-host>/api/v1/tools?toolkit=bce,plivo&limit=2" \
-H "Authorization: Bearer $API_KEY"{
"data": [
{ "slug": "BCE_GET_EXCHANGE_RATES", "...": "..." },
{ "slug": "BCE_SEND_REQUEST", "...": "..." }
],
"next_cursor": "QkNFX1NFTkRfUkVRVUVTVA"
}The next request, with cursor=QkNFX1NFTkRfUkVRVUVTVA, returns PLIVO_SEND_REQUEST and
"next_cursor": null.
List toolkits and categories
The toolkit list is paginated the same way (limit default 50, at most 200) and also returns
total, the number of toolkits that match the filters:
curl "https://<your-host>/api/v1/toolkits?category=ai&limit=2" \
-H "Authorization: Bearer $API_KEY"{
"data": [
{
"slug": "affinda",
"name": "Affinda",
"description": "AI document extraction: resumes, invoices and more",
"categories": ["ai"],
"logo": "https://<your-host>/logos/apps/affinda.png",
"homepage_url": "https://www.affinda.com",
"docs_url": "https://docs.affinda.com",
"auth_schemes": ["fields"],
"tools_count": 1,
"triggers_count": 0,
"featured": false,
"source": "catalog"
},
{ "slug": "agentql", "...": "..." }
],
"next_cursor": "YWdlbnRxbA",
"total": 122
}| Filter | Meaning |
|---|---|
category | One category slug, for example developer-tools. |
search | Case-insensitive match on slug, name and description. |
source | native (hand-written toolkits) or catalog (catalog apps). |
featured | true returns the featured toolkits in their curated order, up to limit, and next_cursor is always null. |
A cursor is opaque: reuse it only with the same filters. A malformed cursor, or one from another
list, is 400 bad_request.
GET /api/v1/toolkit_categories returns the 17 categories in display order with the number of
toolkits in each, zero counts included. It takes the same search and source filters, so you can
show counts next to a search box. total is the number of distinct toolkits matched.
{
"data": [
{ "slug": "ai", "label": "AI and machine learning", "count": 122 },
{ "slug": "communication", "label": "Communication", "count": 74 },
{ "slug": "productivity", "label": "Productivity", "count": 118 },
{ "...": "..." }
],
"total": 1182
}Category slugs changed in 0.9.0. For one minor version the old slugs still work as filters:
email maps to communication, calendar and documents to productivity, utilities to
developer-tools, and news to media. See the changelog.
Execute a tool
POST /api/v1/tools/{slug}/execute takes the tool arguments plus the account to run as. Identify
the account in one of two ways:
{ "user_id": "user-42", "arguments": { "owner": "acme", "repo": "widgets", "title": "Bug" } }{
"connected_account_id": "ca_...",
"arguments": { "to": ["dev@example.com"], "subject": "Hello", "body": "Hi" }
}user_idpicks the active account of that user for the tool's toolkit. Use it when each of your users has one account per app.connected_account_idpicks one specific account. Use it when a user connected several.
Tools that need no connection (for example Hacker News) accept neither field. Requests larger than
1 MB are rejected with 413.
Send an Idempotency-Key header to make retries safe: a retry with the same key returns the first
response instead of running the tool again. See Idempotency.
Execution is rate limited per project (RateLimit-* headers on every
response, 429 rate_limited with Retry-After when exceeded) and counts toward your plan's
monthly tool executions. Over that quota, execute returns 429 quota_exceeded until the next UTC
month or an upgrade; see Usage and billing. In the dashboard owners, admins and developers can run tools (viewers can't). An API key needs the
tool:execute permission (403 insufficient_scope otherwise), and a key limited to some tools
gets 403 tool_not_allowed for any other tool, before anything runs or is logged; see
API keys.
Response envelope
{
"successful": true,
"data": { "number": 12, "html_url": "https://github.com/acme/widgets/issues/12" },
"error": null,
"log_id": "exec_...",
"tool_slug": "GITHUB_CREATE_ISSUE",
"connected_account_id": "ca_...",
"duration_ms": 412
}200 versus 4xx
The rule is simple: if the tool ran, the HTTP status is 200 and successful tells you whether it
worked. When it failed, data is null and error holds a code, a message and optional
details. HTTP 4xx and 5xx are reserved for requests that never reached the tool: an unknown
tool (404 tool_not_found), a malformed body (400 validation_error), an unknown account
(404 connected_account_not_found) or an account that is not usable
(409 connection_not_active). Check successful, not only the status.
Tool error codes
These are the error.code values inside a 200 response.
| Code | Meaning |
|---|---|
validation_error | The arguments do not match the input schema. details lists the failing fields. |
invalid_output | The provider answered with something the tool could not interpret. |
unauthorized | The provider rejected the credential. See revoked accounts below. |
forbidden | The account lacks a permission or the app is not installed on the target. |
not_found | The target (repository, message, page) does not exist or is not visible. |
rate_limited | The provider asked us to slow down. details.retry_after (seconds), if sent. |
upstream_error | The provider failed or returned an unexpected error. |
timeout | The tool did not finish within 60 seconds. |
destination_not_allowed | The request targeted a private or otherwise blocked network address. |
internal_error | Something went wrong on our side. |
destination_not_allowed is returned by tools that call arbitrary URLs. They can only reach public
internet hosts, never loopback, private ranges or cloud metadata addresses, also not through
redirects.
Revoked accounts and reconnecting
If a provider answers 401, we refresh the credential once and retry. When the provider still
refuses, the account becomes revoked, the call returns unauthorized, and every later call
returns 409 connection_not_active until the user reconnects. In the dashboard the account shows
as Revoked with the hint "Rejected by the provider, reconnect". Use Reconnect there, or create a
new connection for the same user, as described in Connect accounts.
API keys are checked when they are submitted: a key the provider rejects fails the connect step
with invalid_credentials, so a wrong key never becomes an active account.
Execution logs
Every execution that reaches the tool layer is logged, whether it succeeded or not.
curl "https://<your-host>/api/v1/logs/tools?source=api&status=error&limit=20" \
-H "Authorization: Bearer $API_KEY"
curl "https://<your-host>/api/v1/logs/tools/exec_..." -H "Authorization: Bearer $API_KEY"The list is newest first. Filters: tool, toolkit, status (success or error), source
(api, mcp, playground, automation or trigger), connected_account_id, user_id,
mcp_server_id (calls made through one MCP server),
automation_run_id (the steps of one automation run), from
(inclusive) and to (exclusive) as ISO timestamps, and limit (default 50). The response includes
a next_cursor: pass it back as cursor with the same filters to get the next page, and stop when
it is null. A cursor that does not parse returns 400 with the problem on the cursor field.
Automation steps. Each action of an automation run that reaches the app
is logged here with source: "automation" and automation_run_id (arun_...), and counts toward
usage like any execution; a retried step logs one row per attempt. Filter steps and skipped steps
are not logged. In the dashboard the Logs source filter has Automation, and those rows link to
their run. The trigger source is reserved and never used.
curl "https://<your-host>/api/v1/logs/tools?source=automation&automation_run_id=arun_..." \
-H "Authorization: Bearer $API_KEY"The detail endpoint adds the input and output. Secrets such as tokens and authorization headers are
redacted, and very large payloads are stored as a truncated preview flagged truncated.
- Reading logs with an API key needs the
logs:readpermission. - Logs are kept for 30 days, or for your plan's log retention on the hosted platform (see Usage and billing), then deleted.
- Inputs and outputs are visible to every member of the project, in the dashboard Logs page and through the API. Do not pass secrets as tool arguments.

