Skip to main content
Glama

Schedule a catalog API

schedule_run
Idempotent

Runs 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

NameRequiredDescriptionDefault
nameNoA label for you.
everyYesHow often: hour, day or week (not more often than every 1 hour).
inputNoThe 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_idNoFrom find_api (with endpoint_id).
at_utcNoUTC time of day, HH:MM (for every: hour, the minute past each hour). Default 00:00.
fieldsNoOnly these output fields.
run_nowNoAlso run once at the next tick, not only from the next slot.
versionNoThe 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.
weekdayNoFor every: week, the day: 0 Monday to 6 Sunday. Default Monday.
max_itemsNoEach run ends once it has kept this many records.
source_idNoInstead of api_id and endpoint_id: one of your own APIs.
endpoint_idNoFrom find_api (with api_id).
idempotency_keyYesRequired. 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_secondsNoEach run ends after this many seconds of running.

Output Schema

NameRequiredDescriptionDefault
scheduleYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / every / type
      Added value: +"string"
  2. First observed

TDQS

A4/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Well beyond the annotations, the description discloses the operational envelope: minimum 1-hour interval, 50-schedule workspace cap, 30-day record retention, the exact auto-pause triggers (key revoked/expired, budget/Units exhausted, non-additive API change, three consecutive failures), skipping when the prior run is active, catch-up behaviour after downtime, and the rebound-on-revocation rule. That is exactly the mutation and lifecycle context an agent needs and that destructiveHint/openWorldHint alone cannot convey.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core purpose is front-loaded, but the body is a single dense block that chains idempotency, pause conditions, retention and slot-skipping together with no separation. Almost every clause carries information, yet the lack of structure makes it harder to scan than it needs to be.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 14-parameter mutation tool with an output schema (so return values need not be described) this is unusually complete: it covers input preconditions, cadence limits, run termination via max_items/timeout_seconds, lifecycle and auto-pause behaviour, quota and retention limits, and idempotent retry semantics. Nothing an agent needs in order to call it correctly appears to be missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 100% schema coverage the baseline is 3, and the description adds real meaning on top: it explains that api_id/endpoint_id come from find_api, that source_id is an alternative to that pair, that every required input (an item's url) must be supplied at creation or the request is refused, and it details the idempotency_key contract including the 409 paths. It does not expand on at_utc, weekday, max_items or timeout_seconds beyond the schema wording.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening states a specific verb and resource: it runs a catalog API (identified by api_id/endpoint_id) or the caller's own API (source_id) on a recurring cadence. That is enough to tell it apart from resume_schedule and the get_run family, which it names. It never explicitly contrasts with the one-shot run_api, so the boundary between scheduling and a single run is left implicit.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied strongly by 'on a cadence' and by the stated interactions with resume_schedule, pause_schedule and the run readers, but there is no explicit 'use this when…, not when…' routing. An agent must infer that a one-off execution belongs to run_api and that a paused schedule needs resume_schedule rather than this tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources