Run a catalog API
run_apiRuns a catalog API (endpoint_id as find_api returns it; api_id is optional) or one of the caller's own APIs (source_id) and answers with its records. The run is owned by and charged to the caller's workspace. max_items sets how many records it keeps. A run that ends within about 85 seconds answers with its records; a longer run answers with its run_id, which get_run, get_run_items and get_run_result read. A retry with the same idempotency_key and the same arguments answers the same run. An API whose inputs include filters takes the keys and values describe_api_filters lists.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"idempotency_key": "<idempotency_key>"
},
"name": "run_api"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| input | No | The API's inputs, as find_api lists them. | |
| api_id | No | From find_api. Optional: endpoint_id alone names its API. | |
| fields | No | Only these output fields (find_api's run_with lists them). | |
| version | No | The major version of the catalog API to run (the versions in get_api). Leave it out for the latest. A sunset version runs the latest. | |
| max_items | No | End the run once it has kept this many records; by default it runs until the source is exhausted, its timeout or the budget ends it. | |
| source_id | No | Instead of endpoint_id: one of your own APIs, such as one you just built. | |
| endpoint_id | No | From find_api, copied exactly. | |
| wait_seconds | No | How long this call waits for the run to end before it answers with the run and its run_id. 0 answers at once, with a run_id that get_run, get_run_items and get_run_result read later. MCP clients commonly stop waiting after 90-120 seconds. | |
| idempotency_key | Yes | Your retry key: the same key answers the same run and never charges twice. Required for a workspace key. | |
| timeout_seconds | No | End the run after this many seconds of running (time queued does not count); records it kept stay readable. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| run | No | Running while queued or running; poll links.self or links.result every poll_after_seconds. Records are readable from links.items while it runs. | |
| message | No | ||
| records | No | ||
| summary | No | ||
| delivery | No | ||
| metadata | No |