Skip to main content
Glama
Cloudflare Workers MCP Server

Cloudflare Workers MCP Server

Create Version (staged)

create_version

Upload a new Worker version without deploying it, keeping live traffic unchanged for staged rollouts; existing secrets carry over unless a binding with the same name is passed.

Instructions

Upload a new Worker version WITHOUT deploying it — live traffic is unchanged until the version is referenced by create_deployment. Use for staged rollouts. Existing secrets carry over unless you pass a binding with the same name.

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>",
      "modules": "<modules>"
    },
    "name": "create_version"
  }
}

Input Schema

NameRequiredDescriptionDefault
tagNoVersion tag (workers/tag annotation)
messageNoVersion message (workers/message annotation, shown in the dashboard)
modulesYesModules, each with inline content or a local file path; the first is the entry point unless main_module says otherwise
bindingsNoResource bindings for this version
keep_assetsNoRetain the previous version's static assets
main_moduleNoEntry-point module name (default: first module)
script_nameYesThe name of the Worker script
compatibility_dateNoYYYY-MM-DD; defaults to today
compatibility_flagsNoRuntime compatibility flags. nodejs_compat is on by default for compatibility_date >= 2026-08-04, so it is not needed with the default (today) date

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields 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"
    • addedInput schema / properties / compatibility_flags / description
      Added value: +"Runtime compatibility flags. nodejs_compat is on by default for compatibility_date >= 2026-08-04, so it is not needed with the default (today) date"
    • changedInput schema / properties / modules / description
      Previous value: -"ES modules; the first is the entry point unless main_module says otherwise"New value: +"Modules, each with inline content or a local file path; the first is the entry point unless main_module says otherwise"
    • addedInput schema / properties / modules / items / additionalProperties
      Added value: +false
    • changedInput schema / properties / modules / items / properties / content / description
      Previous value: -"Module source code"New value: +"Inline module source code. Use path instead for large or bundled sources"
    • changedInput schema / properties / modules / items / properties / content_type / description
      Previous value: -"Part content type (default application/javascript+module)"New value: +"Module content type. Default: inferred from the path's extension (.js/.mjs ES module, .cjs, .py, .wasm, .txt/.html/.sql text, .bin data), else application/javascript+module"
    • changedInput schema / properties / modules / items / properties / name / description
      Previous value: -"Module filename, e.g. index.js"New value: +"Module filename, e.g. index.js. Required with content; defaults to the file's basename with path"
    • addedInput schema / properties / modules / items / properties / path
      Added value: +{
      +  "description": "Local file to upload as this module (absolute path recommended), e.g. a bundled dist/index.js or a .wasm file. The server reads it, so the source never passes through the conversation",
      +  "type": "string"
      +}
    • removedInput schema / properties / modules / items / required
      Removed value: -[
      -  "name",
      -  "content"
      -]
  2. First observedv1.0.0

TDQS

A4.4/5.0
Behavior4/5

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

Beyond the annotations (readOnly=false, destructive=false, idempotent=false) it discloses two non-obvious behaviors: live traffic is untouched, and existing secrets carry over unless a binding with the same name is passed. The secret-inheritance rule is real operational value that no annotation or schema conveys. It does not mention that repeated calls create distinct versions (consistent with idempotentHint=false) or any permission requirements.

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 sentences, front-loaded with the single most important fact (this does not deploy), followed by the operational caveat about secret inheritance. Nothing is padded or redundant.

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 9-parameter tool with nested modules and six binding variants and no output schema, the description covers the crucial lifecycle relationship and the secret-override gotcha. It leaves out what the call returns (a version identifier for later use with create_deployment) and any permission requirements, which are mild gaps given the fully documented schema.

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, but the description adds semantics the schema cannot express: bindings with a matching name override inherited secrets, which changes how an agent should populate the bindings array. That is meaningful behavioral meaning layered onto the parameter, not a restatement.

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 ("Upload a new Worker version") and immediately delimits it against the deployment siblings: it does NOT change live traffic until create_deployment references it. An agent can distinguish it from deploy_worker and create_deployment without opening any schema.

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 an explicit use case ("staged rollouts") and names create_deployment as the follow-up step that activates the version, which effectively routes the agent to the right sibling for going live. It stops short of an explicit when-not-to-use rule versus deploy_worker, but the staged-vs-live distinction is clear.

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