Skip to main content
Glama
Cloudflare Workers MCP Server

Cloudflare Workers MCP Server

Set Secrets

set_secrets
DestructiveIdempotent

Create, update, or delete Cloudflare Worker secrets without editing code or bindings; all changes deploy immediately in one new version.

Instructions

Create, update or delete secrets on a Worker without touching its code or other bindings. All changes land in ONE new version, deployed immediately. Pass a string to set a secret and null to delete it. Values are never echoed back. Secret values pass through the conversation, so for highly sensitive values prefer wrangler secret put.

Input Schema

NameRequiredDescriptionDefault
secretsYesMap of secret name -> value. A string creates or updates a secret_text binding, null deletes it, and names not listed are left unchanged. All changes land in ONE new version that is deployed immediately.
script_nameYesThe name of the Worker script

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.4.0

TDQS

A4.5/5.0
Behavior5/5

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

Annotations only flag destructive/openWorld/idempotent; the description adds what those hints do not: all changes collapse into ONE new version that is deployed immediately, unlisted secrets are untouched, values are never echoed back, and secret values transit the conversation (a real security caveat with a named escape hatch). This is exactly the behavioral context an agent needs before invoking a destructive, immediately-deploying write.

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?

Four short sentences, front-loaded with what the tool does and its blast radius, then the string/null mechanic, then the security caveat. Every sentence carries distinct information with no repetition of the annotations.

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 two-parameter mutation with no output schema, the definition covers the blast radius (new version, immediate deploy), non-targeted bindings, deletion semantics, and the return-value behavior ('values are never echoed back'). Nothing needed to call it safely is missing.

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?

The schema already documents both parameters at 100% coverage, including the string-sets/null-deletes semantics and the 'names not listed are left unchanged' rule. The description restates the string/null convention and adds little parameter-level meaning beyond that, so the baseline 3 applies.

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 opens with a specific verb set (create/update/delete) and a precise resource (secrets on a Worker), and scopes it with 'without touching its code or other bindings'. That scope statement separates it from siblings like deploy_worker, update_worker_settings, delete_secret and list_secrets without the agent needing to open another 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?

It gives a clear usage context (bulk secret management in a single version) and an explicit alternative for a specific case: use `wrangler secret put` for highly sensitive values. It stops short of naming sibling tools such as delete_secret or list_secrets, so an agent still has to infer when the single-secret sibling is preferable to this batch operation.

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