mcp-cloudflare-api__execute
Execute 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>; // Objects and arrays are sent as JSON. Bytes (Uint8Array, ArrayBuffer), Blob, FormData, // URLSearchParams, streams, and strings with a non-JSON contentType are sent as they are. A string // with a JSON contentType, or none, is sent as it is when it is already JSON, else as a JSON string. body?: unknown; // Content-Type header. Defaults to application/json for JSON bodies. Leave it unset for FormData, // whose multipart boundary fetch adds. contentType?: string; }
// The response body as the API sends it. Most APIs wrap it in this envelope; a few send their JSON // bare (the spec's re… Through Royally: waits for a person to approve it in Royally; nothing on the site changes until then. This connection has no undo; Royally recorded the change but cannot reverse it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | JavaScript async arrow function to execute | |
| site_id | No | Site to run this tool on: bb028350-9e3e-46c0-bea7-cd6c2dedf060 (https://mcp.cloudflare.com/mcp) | |
| truncate | No | Cap the result at ~6,000 tokens. Set to false only when the result goes straight to a file or pipe, not into the conversation: without the cap, a broad query can return megabytes. | |
| account_id | No | Cloudflare account ID to run against. Optional when the session is authorized for exactly one account, and for account-independent calls such as GET /accounts. |