list_schedules
List schedules, most recently updated first, each with its latest run.
read-onlyidempotentMCP toolSchedule
Archived schedules are left out unless archived is set.
Calling it#
curl -X POST http://127.0.0.1:8787/komrad.schedule.v1.ScheduleService/ListSchedules \
-H 'Content-Type: application/json' \
-d '{}'komrad rpc list-schedules{
"name": "list_schedules",
"arguments": {}
}Offered by the komrad MCP server to orchestrator agents.
Request#
ListSchedulesRequest#
| Field | Type | Description |
|---|---|---|
pagination | Pagination | The page to read. |
archived | bool | Whether to list only archived schedules instead of live ones. |
Response#
ListSchedulesResponse#
| Field | Type | Description |
|---|---|---|
schedules | Schedule[] | One page of schedules, most recently updated first. |
next_page_token | string | The cursor for the next page. Unset on the last page. |
Types#
Pagination#
Pagination selects one page of a listing.
Schedule#
Schedule is a cron expression that creates a task or mails an orchestrator each time it matches.
| Field | Type | Description |
|---|---|---|
id | uuid* | The schedule's id. |
name | string | The schedule's name. |
cron | string | The schedule's cron expression, in five fields. |
timezone | string | The timezone the cron expression is read in. Empty uses the machine's timezone. |
enabled | bool | Whether the schedule is enabled. A disabled schedule keeps its record and never runs. |
prompt | string | The prompt each launched writer starts with, or the mail sent to the orchestrator. |
workflow_id | uuid* | The id of the workflow the schedule belongs to. For an orchestrator schedule, the orchestrator's workflow. |
kind | ScheduleKind | Whether the schedule creates a task or mails an orchestrator. |
orchestrator_agent_id | uuid | The id of the orchestrator the schedule mails. Set only on an orchestrator schedule. |
next_run_at | timestamp | When the cron expression next matches. Unset while the schedule is disabled. |
latest_run | ScheduleRun | The schedule's newest run. Unset when the schedule has never run or the run's record has expired. |
recent_runs | ScheduleRun[] | The schedule's newest runs, newest first. Set only in |
archived_at | timestamp | When the schedule was archived. Unset while the schedule is live. |
ScheduleRun#
ScheduleRun is one time a schedule's cron expression matched, with its state.
| Field | Type | Description |
|---|---|---|
id | int64 | The run's id. A higher id is a newer run. |
scheduled_for | timestamp | The time the cron expression matched for this run. |
state | ScheduleRunState | The run's state. |
attempt | int32 | The run's current attempt, counting from one once the run has started. |
max_attempts | int32 | How many attempts the run has before it is discarded. |
finalized_at | timestamp | When the run finished. Unset while the run is waiting or running. |
message | string | Why the run was skipped, or the error from its last failed attempt. Empty when the run completed. |
ScheduleKind#
ScheduleKind is what a schedule does each time its cron expression matches.
| Value | Description |
|---|---|
orchestrator | Mails the prompt to a running orchestrator. |
task | Creates a task in the workflow and launches its writer with the prompt. |
ScheduleRunState#
ScheduleRunState is the state of one schedule run.
| Value | Description |
|---|---|
available | Waiting to start. |
pending | Held back until something releases the run. |
scheduled | Waiting for a later time to start. |
running | Running now. |
retryable | Failed an attempt and waiting to try again. |
completed | Launched the run's agent or sent the run's mail. |
cancelled | Skipped, with the reason in the run's message. |
discarded | Out of attempts, with the last error in the run's message. |