Schedule a catalog API
schedule_runRuns a catalog API (api_id and endpoint_id as find_api returns them) or one of the caller's own APIs (source_id) on a cadence: every hour, day or week at a UTC time (not more often than every 1 hour). Every input the API requires (an item API's url) is given at creation; a missing one is refused. Each due slot starts a normal run owned by and charged to the workspace, ending at max_items or timeout_seconds; the schedule's last_run_id names the latest, which get_run, get_run_items and get_run_result read, and list_runs lists. If the process was down, only the latest missed slot runs. The schedule pauses itself, with pause_reason, when the key behind it is revoked or expires, Units or budget run out, the API leaves the catalog or changes in a way that is not additive (version_changed; a schedule on a version keeps following its minors), or 3 runs in a row fail; resume_schedule starts it again from now. A workspace holds at most 50 schedules; a scheduled run's records are kept at least 30 days (no purge is built yet). A slot does not start while the schedule's previous run is still queued or running: it is skipped (skipped_slots, last_skip_reason previous_run_active). idempotency_key is required: a retry with the same key and arguments (name and run_now included) answers the same schedule, never a second; other arguments under the key are refused (409), and a key whose schedule was deleted is refused (409 schedule_deleted): it is never revived. If the key that made the schedule was revoked or expired and another key of the workspace retries the create, the schedule moves to that key (rebound: true).
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": {
"every": "<every>",
"idempotency_key": "<idempotency_key>"
},
"name": "schedule_run"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | A label for you. | |
| every | Yes | How often: hour, day or week (not more often than every 1 hour). | |
| input | No | The API's inputs, as find_api lists them. Every required input (an item API's url) is given now; each slot runs with them. | |
| api_id | No | From find_api (with endpoint_id). | |
| at_utc | No | UTC time of day, HH:MM (for every: hour, the minute past each hour). Default 00:00. | |
| fields | No | Only these output fields. | |
| run_now | No | Also run once at the next tick, not only from the next slot. | |
| version | No | The major version of the API to run (see its versions). Default: the latest. Each slot keeps running this major until it sunsets, then runs the latest. | |
| weekday | No | For every: week, the day: 0 Monday to 6 Sunday. Default Monday. | |
| max_items | No | Each run ends once it has kept this many records. | |
| source_id | No | Instead of api_id and endpoint_id: one of your own APIs. | |
| endpoint_id | No | From find_api (with api_id). | |
| idempotency_key | Yes | Required. Your retry key: the same key and arguments answer the same schedule and never create a second; the same key with other arguments is refused (409). | |
| timeout_seconds | No | Each run ends after this many seconds of running. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| schedule | Yes |