Skip to main content
Glama

add_schedule

Create or update a cron schedule that sends recurring POST requests to a deployed app endpoint, with timezone, timeout, and overwrite-by-name support.

Instructions

Have this machine POST to a deployed app's path on a timer (cron).

    Each due minute the daemon POSTs ``{}`` to the running app with headers
    ``X-Nerdit-Schedule`` (the name), ``X-Nerdit-Schedule-Run`` (the run id)
    and ``X-Nerdit-Schedule-Token``: the app must compare that token, in
    constant time, with its ``NERDIT_SCHEDULE_TOKEN`` env var and refuse a
    mismatch. Answer ``202`` and work from your own queue for long jobs.
    No retry, no overlap (a run still out makes the next ``skipped_overlap``),
    one catch-up run after downtime under 24 h. Upsert by name: the same
    name with new fields updates it. At most 10 per app.

    Refusals: 422 ``schedule.cron_invalid`` / ``schedule.too_frequent`` /
    ``schedule.path_invalid`` / ``schedule.timezone_unknown`` /
    ``schedule.name_invalid`` / ``schedule.kind_unsupported``; 409
    ``schedule.limit_reached``; 409 ``schedule.restart_required`` (the app
    was launched by an older daemon: restart it once). Returns
    ``{schedule, created}``.
    

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": {
      "name": "<name>",
      "schedule_name": "<schedule_name>",
      "cron": "<cron>",
      "path": "<path>"
    },
    "name": "add_schedule"
  }
}

Input Schema

NameRequiredDescriptionDefault
cronYesFive fields: minute hour day-of-month month day-of-week. Digits, ``*``, lists ``a,b``, ranges ``a-b``, steps ``*/n`` and ``a-b/n``; day of week 0-7 (0 and 7 are Sunday); no names, no ``@daily``. At most every 5 minutes, e.g. ``0 7 * * 1-5``.
nameYesName (or row id) of an existing deployed app — only kind 'service' can be exposed: ``share_service``/``add_domain`` refuse a model or database with 422 ``*.kind_unsupported``, while the remove tools just find nothing to undo.
pathYesApp path the daemon POSTs ``{}`` to, e.g. ``/_agent/run/morning``.
timezoneNoIANA zone the cron reads in (default ``UTC``).
timeout_sNoSeconds the call may take, 5-900 (default 300).
schedule_nameYesSchedule name: lowercase letters, digits and '-', 1-32 characters, starting with a letter (e.g. ``morning``); the app receives it as ``X-Nerdit-Schedule``.
idempotency_keyNoCaller-chosen key: a retry with the same key replays the first result instead of acting twice. Omit and a fresh key is minted per call, so each call acts.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.9.3

TDQS

A4.1/5.0
Behavior5/5

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

With no annotations at all, the description carries the full burden and does so: it specifies the auth contract (X-Nerdit-Schedule-Token must be compared constant-time against NERDIT_SCHEDULE_TOKEN), overlap/retry semantics, skipped_overlap outcome, downtime catch-up under 24 h, the upsert behavior, the 10-per-app limit, and every refusal code with its HTTP status. Return shape ``{schedule, created}`` is also disclosed.

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

Conciseness4/5

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

The core action is front-loaded in the first sentence, and the following paragraphs are organized by topic (contract, run semantics, upsert/limits, refusals, return value). It is dense and information-rich, but the heavy backtick formatting and run-on clause about removing tools make it slightly 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 7-parameter mutation tool with no annotations and no output schema, the description covers everything an agent needs: authentication requirements, scheduling semantics, idempotent upsert, quota, failure modes with status codes, and the return shape. Nothing material is 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?

Schema coverage is 100%, so the baseline is 3; the description nevertheless adds meaning, such as what the app receives in the X-Nerdit-Schedule header and which refusal codes map to which parameter (cron_invalid, too_frequent, path_invalid, timezone_unknown, name_invalid, kind_unsupported). It does not add much over the schema for timeout_s or idempotency_key.

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?

Opens with a precise verb+mechanism: 'Have this machine POST to a deployed app's ``path`` on a timer (cron)', which tells an agent exactly what the tool creates. It also notes the upsert-by-name behavior and the 10-per-app cap, further narrowing the concept. It stops short of naming siblings like run_schedule or list_schedule_runs, so it is clear but not explicitly differentiated.

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?

The description gives rich operating context (respond 202 and work from your own queue for long jobs, no retry, no overlap, one catch-up run) and states that the same name with new fields updates an existing schedule. However it offers no explicit when-to-use vs when-not guidance and never routes the agent toward manual execution (run_schedule) or removal (remove_schedule) alternatives.

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