Skip to main content
Glama

Schedule a task

set_schedule

Create or update (by name) a scheduled run of the agent. Provide EXACTLY ONE cadence form: cadence (frequency-based), every+period (interval), cron_expression, or run_at (one-shot). AGENT mode uses instruction; TOOL mode uses action_tool+action_params (fires one tool deterministically).

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": {
      "agent_id": "<agent_id>"
    },
    "name": "set_schedule"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNoStable per-agent schedule name — reusing a name updates that schedule in place.
everyNoInterval count (used with `period`), e.g. 6.
periodNoInterval unit (used with `every`).
run_atNoISO-8601 datetime for a one-shot run (future, within ~366 days).
cadenceNoFrequency form: {frequency: hourly|daily|weekly|monthly, at: 'HH:MM', weekday?: mon..sun, day_of_month?: 1-28}.
contextNoOptional context object made available to each run.
enabledNofalse pauses the schedule (no runs, settings kept), true resumes it. With only schedule_id + enabled, it just pauses or resumes.
agent_idYesTarget agent's id (from list_agents / create_agent / get_catalog view=agents).
max_runsNoOptional cap on the number of runs.
timezoneNoIANA timezone for cron/one-shot. Defaults to the org timezone, else UTC.
expires_atNoISO-8601 datetime after which the schedule stops.
action_toolNoA single tool name to fire deterministically each run (TOOL mode). Clears instruction.
instructionNoWhat the agent should do each run (AGENT mode). Omit if using action_tool.
schedule_idNoId of an existing schedule to update (from list_schedules); lets you rename it.
thread_modeNo'new' = a fresh conversation each run; 'resume' = the SAME conversation every run (opened for the schedule if it has none), so the agent keeps its context and people can reply there between runs.
action_paramsNoKeyword arguments passed to action_tool at fire time.
cron_expressionNo5-field cron expression, interpreted in `timezone`.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • addedInput schema / properties / enabled
      Added value: +{
      +  "description": "false pauses the schedule (no runs, settings kept), true resumes it. With only schedule_id + enabled, it just pauses or resumes.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / schedule_id
      Added value: +{
      +  "description": "Id of an existing schedule to update (from list_schedules); lets you rename it.",
      +  "type": "string"
      +}
    • changedInput schema / properties / thread_mode / description
      Previous value: -"Conversation thread handling per run."New value: +"'new' = a fresh conversation each run; 'resume' = the SAME conversation every run (opened for the schedule if it has none), so the agent keeps its context and people can reply there between runs."
    • changedInput schema / required
      Previous value: -[
      -  "agent_id",
      -  "name"
      -]New value: +[
      +  "agent_id"
      +]
  2. Changed16 schema fields changed
    • addedInput schema / properties / action_params
      Added value: +{
      +  "description": "Keyword arguments passed to action_tool at fire time.",
      +  "type": "object"
      +}
    • addedInput schema / properties / action_tool
      Added value: +{
      +  "description": "A single tool name to fire deterministically each run (TOOL mode). Clears instruction.",
      +  "type": "string"
      +}
    • addedInput schema / properties / agent_id / description
      Added value: +"Target agent's id (from list_agents / create_agent / get_catalog view=agents)."
    • addedInput schema / properties / cadence
      Added value: +{
      +  "description": "Frequency form: {frequency: hourly|daily|weekly|monthly, at: 'HH:MM', weekday?: mon..sun, day_of_month?: 1-28}.",
      +  "type": "object"
      +}
    • addedInput schema / properties / context
      Added value: +{
      +  "description": "Optional context object made available to each run.",
      +  "type": "object"
      +}
    • addedInput schema / properties / cron_expression
      Added value: +{
      +  "description": "5-field cron expression, interpreted in `timezone`.",
      +  "type": "string"
      +}
    • addedInput schema / properties / every
      Added value: +{
      +  "description": "Interval count (used with `period`), e.g. 6.",
      +  "type": "integer"
      +}
    • addedInput schema / properties / expires_at
      Added value: +{
      +  "description": "ISO-8601 datetime after which the schedule stops.",
      +  "type": "string"
      +}
    • addedInput schema / properties / instruction / description
      Added value: +"What the agent should do each run (AGENT mode). Omit if using action_tool."
    • addedInput schema / properties / max_runs
      Added value: +{
      +  "description": "Optional cap on the number of runs.",
      +  "type": "integer"
      +}
    • addedInput schema / properties / name / description
      Added value: +"Stable per-agent schedule name — reusing a name updates that schedule in place."
    • addedInput schema / properties / period
      Added value: +{
      +  "description": "Interval unit (used with `every`).",
      +  "enum": [
      +    "hours",
      +    "days"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / run_at
      Added value: +{
      +  "description": "ISO-8601 datetime for a one-shot run (future, within ~366 days).",
      +  "type": "string"
      +}
    • addedInput schema / properties / thread_mode
      Added value: +{
      +  "description": "Conversation thread handling per run.",
      +  "enum": [
      +    "new",
      +    "resume"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / timezone
      Added value: +{
      +  "description": "IANA timezone for cron/one-shot. Defaults to the org timezone, else UTC.",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "agent_id",
      -  "name",
      -  "instruction"
      -]New value: +[
      +  "agent_id",
      +  "name"
      +]
  3. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations only say it is a non-read-only, non-destructive, non-open-world write, so the description is free to add the more interesting behavior: name reuse mutates the existing schedule in place, setting action_tool clears instruction, and enabled=false pauses while keeping settings. It omits any permission/ownership requirements or what happens on conflicting updates, but it is well beyond annotation coverage.

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?

Three dense sentences, purpose front-loaded, then cadence exclusivity, then mode split — every sentence carries a rule. The heavy backtick compression makes it terse but readable; no filler or restatement of the title.

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

Completeness3/5

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

For a 17-parameter mutation tool with no output schema, the description covers the hardest part (cadence exclusivity and mode pairing) but says nothing about what is returned on success (e.g. a schedule_id) or how schedule_id and name interact when both are supplied. Schema coverage compensates for most parameter-level gaps, but the response shape and the rename path remain undocumented.

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

Parameters3/5

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

Schema description coverage is 100%, so the baseline is 3; the description does add real cross-field semantics the schema cannot express — the four mutually exclusive cadence forms and the AGENT-vs-TOOL parameter pairing — which is genuine added meaning. It leaves other parameters (timezone, expires_at, max_runs, context, thread_mode) entirely to the schema, which is acceptable given the coverage.

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?

States a specific verb and resource ('Create or update ... a scheduled run of the agent') and clarifies the upsert key ('by name'), which an agent cannot infer from the name alone. It does not, however, distinguish itself from the obvious sibling cancel_schedule, so the agent must infer the create/update-vs-remove split from names.

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

Usage Guidelines4/5

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

Gives a strong usage constraint ('Provide EXACTLY ONE cadence form') and enumerates the mutually exclusive forms, plus a mode-selection rule (AGENT uses `instruction`; TOOL uses `action_tool`+`action_params`). It stops short of naming when to prefer a different tool (e.g. a trigger-based sibling) or when not to schedule at all.

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