Skip to main content
Glama
Cloudflare Workers MCP Server

Cloudflare Workers MCP Server

Set Cron Triggers

set_cron_triggers
DestructiveIdempotent

Replace a Worker's full cron trigger set and remove all triggers by passing an empty list.

Instructions

Replace a Worker's full cron trigger set (the Worker must export a scheduled handler). Pass an empty list to remove all triggers.

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": {
      "script_name": "<script_name>",
      "crons": "<crons>"
    },
    "name": "set_cron_triggers"
  }
}

Input Schema

NameRequiredDescriptionDefault
cronsYesREPLACES the Worker's full cron trigger set; pass [] to remove all triggers
script_nameYesThe name of the Worker script

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.4.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. First observedv1.0.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare destructiveHint and idempotentHint, so the bar is lower; the description still adds material context by making clear this overwrites the entire set rather than appending, and that it fails if no scheduled handler exists. It stops short of stating permission requirements or what the response contains.

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?

Two short sentences, the replacement scope is front-loaded, and the empty-list case comes second — no filler.

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 two-parameter mutation with fully documented schema, the description covers the destructive replace semantics and the runtime prerequisite; the main residual gap is error behavior on Workers lacking a scheduled handler, which is only implied.

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 coverage is 100% and the crons parameter description already says 'REPLACES ... pass [] to remove all triggers', so the description largely restates structured data. Only the scheduled-handler prerequisite adds meaning about how crons will be evaluated.

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?

States a specific verb and resource ('Replace a Worker's full cron trigger set') and makes the replacement scope explicit, which separates it cleanly from the sibling get_cron_triggers.

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 concrete usage rule ('Pass an empty list to remove all triggers') and a prerequisite ('the Worker must export a scheduled handler'), but never names the read counterpart or says when to use this instead of deploy_worker.

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