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).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesStable 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.
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.
thread_modeNoConversation thread handling per run.
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. 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"
      +]
  2. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations only say readOnlyHint=false, destructiveHint=false, and openWorldHint=false, so the description carries the burden of explaining behavior. It discloses the update-by-name semantics, the exclusivity of cadence forms, the deterministic one-tool behavior of TOOL mode, and the clearing of instruction when action_tool is set. It does not mention failure modes or validation errors, but the core behavioral traits are well covered.

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

Conciseness5/5

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

The description is compact and front-loaded: it states the core action first, then the exclusivity rule, then the mode distinction. Every sentence earns its place, and the use of backticks and capitalization ('EXACTLY ONE') makes the critical constraint scannable. No filler or repetition of schema content.

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

Completeness4/5

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

For a 15-parameter tool with no output schema, the description covers the essential decision points: which cadence form to use, which mode to use, and the update-by-name behavior. It does not explain return values or error handling, but the absence of an output schema lowers the bar. The description is complete enough for an agent to construct a valid request.

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 adds value by grouping parameters into cadence forms and modes, but it does not add much beyond the schema's own per-parameter descriptions. The grouping is helpful for understanding mutual exclusivity, but the schema already documents each parameter individually.

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

Purpose5/5

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

The description states a specific verb ('Create or update') and resource ('a scheduled run of the agent'), and immediately distinguishes the two modes (AGENT vs TOOL) and the four mutually exclusive cadence forms. It clearly differentiates from siblings like cancel_schedule and list_schedules by focusing on creation/update semantics.

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

Usage Guidelines5/5

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

The description explicitly says to provide EXACTLY ONE cadence form, names all four alternatives, and explains when to use AGENT mode (instruction) vs TOOL mode (action_tool+action_params). It also notes that reusing a name updates the schedule in place, which is a key usage rule. This is strong guidance for an agent deciding how to invoke the 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