Skip to main content
Glama
daniil-shumko

Cloudflare Workers MCP Server

Add Worker Domain

add_worker_domain
Idempotent

Attach a custom domain to a Cloudflare Worker. Requires an active zone in the account; DNS record and certificate are created automatically.

Instructions

Attach a custom domain to a Worker. The domain's zone must be active in this Cloudflare account (external zones are not supported); Cloudflare creates the DNS record and certificate automatically.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
serviceYesThe Worker (script name) to route the hostname to
zone_idNoZone ID (the zone must be active in this account)
hostnameYesHostname to attach, e.g. app.example.com (zone apex or subdomain)
zone_nameNoZone name, e.g. example.com
environmentNoWorker environment (default: production)
Behavior4/5

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

Annotations already declare readOnlyHint=false and idempotentHint=true, but the description adds valuable behavioral context: it states that Cloudflare automatically creates the DNS record and certificate, and that external zones are unsupported. This goes beyond annotations without contradicting them, helping the agent understand side effects and prerequisites.

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, no redundancy, and the main action is front-loaded. Every clause adds meaningful information—the action, the zone constraint, and the automatic behavior. This is exemplary conciseness.

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?

Given the schema's high coverage and the presence of annotations (idempotency, non-read-only), the description adds the missing context of zone requirements and automatic DNS/cert provisioning. It doesn't describe the return value, but no output schema exists and the behavior is straightforward. A small gap is that it doesn't mention idempotency for duplicate hostnames, though annotations cover that.

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 input schema covers 100% of parameters with descriptions, so the description is not required to add parameter details. The description itself doesn't elaborate on parameter syntax or relationships beyond what the schema provides, which aligns with the baseline for high schema coverage.

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 uses a specific verb ('Attach') and resource ('custom domain to a Worker'), clearly distinguishing it from sibling tools like list_worker_domains and delete_worker_domain. It also adds key scope details (zone must be active, auto DNS/cert), so the purpose is unambiguous.

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?

The description provides a clear prerequisite: the zone must be active in the Cloudflare account, excluding external zones. This gives the agent a condition for when the tool can be used, though it doesn't explicitly contrast with alternatives or state when not to use it. The context is sufficient for choosing this tool over list/delete variants.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/daniil-shumko/cloudflare-workers-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server