cf_generate_worker
Generate a Cloudflare Worker script with routing, middleware, and environment bindings from a template: fetch-handler, scheduled, queue-consumer, or durable-object. Optionally use TypeScript.
Instructions
Generate a Cloudflare Worker script with routing, middleware, and environment bindings
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": {
"name": "<name>",
"template": "<template>"
},
"name": "cf_generate_worker"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Worker name | |
| api_key | No | API key for authentication | |
| template | Yes | Worker template type | |
| typescript | No | Use TypeScript (default true) |