docs
ChatGPTSearch the Cloudflare documentation. This tool should be used to answer any question about Cloudflare products or features, including: - Workers, Pages, R2, Images, Stream, D1, Durable Objects, KV, Workflows, Hyperdrive, Queues - AI Search, Workers AI, Vectorize, AI Gateway, Browser Rendering - Zero Trust, Access, Tunnel, Gateway, Browser Isolation, WARP, DDOS, Magic Transit, Magic WAN - CDN, Cache, DNS, Zaraz, Argo, Rulesets, Terraform, Account and Billing Results are returned as semantically similar chunks to the query.
execute
ChatGPTExecute JavaScript code that can read, create, update, or delete resources through the Cloudflare API. First use the 'search' tool to find the right endpoints, then write code using the cloudflare.request() function. Available in your code: interface CloudflareRequestOptions { method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE"; path: string; query?: Record<string, string | number | boolean | undefined>; body?: unknown; contentType?: string; // Custom Content-Type header (defaults to application/json if body is present) rawBody?: boolean; // If true, sends body as-is without JSON.stringify } interface CloudflareResponse<T = unknown> { success: boolean; status: number; result: T; errors: Array<{ code: number; message: string }>; messages: Array<{ code: number; message: string }>; result_info?: { page: number; per_page: number; total_pages: number; count: number; total_count: number; }; } declare const cloudflare: { request<T = unknown>(options: CloudflareRequestOptions): Promise<CloudflareResponse<T>>; }; declare const accountId: string; // accountId is the account_id tool argument when passed; otherwise the session's account when it is authorized for exactly one. Reading it when neither applies throws an error. When the session has access to multiple accounts, pass account_id. Call GET /accounts to discover available accounts. Paginate as needed, or filter by exact name with GET /accounts?name=<exact account name>. Your code must be an async arrow function that returns the result. Example: Worker with bindings (requires multipart/form-data): async () => { const code = addEventListener('fetch', e => e.respondWith(MY_KV.get('key').then(v => new Response(v || 'none'))));; const metadata = { body_part: "script", bindings: [{ type: "kv_namespace", name: "MY_KV", namespace_id: "your-kv-id" }] }; const b = --F${Date.now()}; const body = [--${b}, 'Content-Disposition: form-data; name="metadata"', 'Content-Type: application/json', '', JSON.stringify(metadata), --${b}, 'Content-Disposition: form-data; name="script"', 'Content-Type: application/javascript', '', code, --${b}--].join("\r\n"); return cloudflare.request({ method: "PUT", path: /accounts/${accountId}/workers/scripts/my-worker, body, contentType: multipart/form-data; boundary=${b}, rawBody: true }); }
search
ChatGPTSearch the Cloudflare OpenAPI spec. All $refs are pre-resolved inline. Products: cloudforce-one, access, workers, magic, dlp, email-security, realtime, devices, ai-gateway, email, intel, gateway, stream, settings, brand-protection, data-security, ai-search, browser-rendering, builds, security-center, dex, images, logpush, api_gateway, addressing, load_balancers, rulesets, vectorize, firewall, logs... (170 total) Types: interface OperationInfo { summary?: string; description?: string; tags?: string[]; parameters?: Array<{ name: string; in: string; required?: boolean; schema?: unknown; description?: string }>; requestBody?: { required?: boolean; content?: Record<string, { schema?: unknown }> }; responses?: Record<string, { description?: string; content?: Record<string, { schema?: unknown }> }>; } interface PathItem { get?: OperationInfo; post?: OperationInfo; put?: OperationInfo; patch?: OperationInfo; delete?: OperationInfo; } declare const spec: { paths: Record<string, PathItem>; }; Examples: // Find endpoints by product async () => { const results = []; for (const [path, methods] of Object.entries(spec.paths)) { for (const [method, op] of Object.entries(methods)) { if (op.tags?.some(t => t.toLowerCase() === 'workers')) { results.push({ method: method.toUpperCase(), path, summary: op.summary }); } } } return results; } // Get endpoint with requestBody schema (refs are resolved) async () => { const op = spec.paths['/accounts/{account_id}/d1/database']?.post; return { summary: op?.summary, requestBody: op?.requestBody }; } // Get endpoint parameters async () => { const op = spec.paths['/accounts/{account_id}/workers/scripts']?.get; return op?.parameters; }
whoami
ChatGPTReturn the Cloudflare user or account that this connection is authenticated as. Takes no arguments. The id is stable across token refresh, reconnection and permission changes.
Cloudflare tools
ClaudeEnables users to build applications on Cloudflare Workers using built-in storage, AI, and compute primitives. Deploy code to production, create and query databases, manage KV stores, and more.
accounts_list
Clauded1_database_create
Clauded1_database_delete
Clauded1_database_get
Clauded1_database_query
Clauded1_databases_list
Claudehyperdrive_config_create
Claudehyperdrive_config_delete
Claudehyperdrive_config_edit
Claudehyperdrive_config_get
Claudehyperdrive_configs_list
Claudekv_namespace_create
Claudekv_namespace_delete
Claudekv_namespace_get
Claudekv_namespace_update
Claudekv_namespaces_list
Clauder2_bucket_create
Clauder2_bucket_delete
Clauder2_bucket_get
Clauder2_buckets_list
Claudeset_active_account
Claudeworkers_get_worker
Claudeworkers_get_worker_code
Claudeworkers_list
Claude