> **Building with AI coding agents?** Install the authstack plugin with one command. This equips your agent with accurate Scalekit implementation patterns.
>
> **Recommended** (the `-y` flags skip prompts, so the command runs without an interactive terminal):
> ```bash
> npx -y @scalekit-inc/cli setup -y
> ```
>
> Global:
> ```bash
> npm install -g @scalekit-inc/cli
> scalekit setup -y
> ```
>
> Supports Claude Code, Cursor, GitHub Copilot, Codex + skills for other Agent Skills-compatible agents in `~/.agents/skills`.
> Skills: integrate-agentkit, implement-saaskit, add-mcp-oauth, implement-sso, implement-scim.
> [Full setup guide](https://docs.scalekit.com/dev-kit/build-with-ai/)

---

# Connect AI agents to Cloudflare

The Cloudflare connector lets your AI agent act in each user's Cloudflare account. Each user signs in to Cloudflare once, and Scalekit stores and refreshes their tokens, so your agent never handles credentials. It comes with 31 tools.

**Authentication:** OAuth 2.0
**Categories:** Developer Tools, Monitoring, Automation
**Tools:** 31: 17 read, 11 write, 3 destructive
**Users sign in with:** OAuth
**OAuth app:** Scalekit's or your own
**Built by:** Scalekit connector
**Try it:** [Playground in the Scalekit dashboard](https://app.scalekit.com/ws/signup?sk_intent=playground&provider=CLOUDFLARE)

## Setup

1. ### Install the SDK

   **Node.js**

   ```bash
   npm install @scalekit-sdk/node dotenv
   ```

   **Python**

   ```bash
   pip install scalekit-sdk-python python-dotenv
   ```

2. ### Set your credentials

   Add your Scalekit credentials to your `.env` file. Find values in **[app.scalekit.com](https://app.scalekit.com)** > **Developers** > **API Credentials**.

   ```sh title=".env"
   SCALEKIT_ENVIRONMENT_URL=<your-environment-url>
   SCALEKIT_CLIENT_ID=<your-client-id>
   SCALEKIT_CLIENT_SECRET=<your-client-secret>
   ```

3. ### Create the Cloudflare connection

   In **AgentKit > Connections**, create a Cloudflare connection. The name you give it is the `connection_name` your code passes. See [Configure connections](/agentkit/connections/).

   Scalekit credentials are available for Cloudflare, so you don't need to register an OAuth app. To show your own app on the consent screen, use your own credentials instead.

   **Use your own OAuth app:**

   Register your Scalekit environment with Cloudflare so Scalekit handles the OAuth flow and token lifecycle for your users. Create a Cloudflare OAuth client, then add its Client ID and Client Secret to your Scalekit connection.

   1. ### Copy the redirect URI from Scalekit

      - In the [Scalekit dashboard](https://app.scalekit.com), go to **AgentKit** > **Connections** > **Create Connection**. Find **Cloudflare** and click **Create**.

        > tip: Testing vs. production
        >
        > By default, Scalekit creates the connection using its own shared credentials. This works for testing. Before going to production, follow the steps below to use your own Cloudflare OAuth client.

      - Click **Use your own credentials** and copy the redirect URI. It looks like `https://<SCALEKIT_ENVIRONMENT_URL>/sso/v1/oauth/<CONNECTION_ID>/callback`.

   2. ### Create an OAuth client in Cloudflare

      - Sign in to the [Cloudflare dashboard](https://dash.cloudflare.com) and go to **Manage account** > **OAuth clients**.
      - Click **Create OAuth client**.
      - Fill in the **Configure OAuth client** form:
        - **Client Name** — for example, `Agent Auth`
        - **Response Type** — `Code, Token`
        - **Grant type** — `Authorization Code`
        - **Token Authentication Method** — `None (PKCE)`
        - **Redirect (Callback) URLs** — paste the redirect URI you copied from Scalekit, then press **Return** to add it
      - Click **Next** to continue to **Select permission scopes**.

        > Image: Cloudflare Create OAuth client form showing Client Name, Response Type, Grant type, Token Authentication Method, and Redirect URLs fields

   3. ### Select permission scopes

      Enable at least the scopes Scalekit requires:

      | Scope | Required |
      |-------|----------|
      | Zone Read (`zone.read`) | Yes |
      | DNS Read (`dns.read`) | Yes |
      | DNS Write (`dns.write`) | Only if your agent needs to manage DNS records |
      | Cache Purge (`cache.purge`) | Only if your agent needs to purge cached content |

      Click **Create** to finish creating the OAuth client.

   4. ### Copy your Client ID and Client Secret

      - Cloudflare shows the **Client ID** and **Client Secret** once the client is created.
      - Copy both values — the secret is shown only once.

   5. ### Add credentials in Scalekit

      - Return to the connection you created in Scalekit and enter:
        - **Client ID** — from your Cloudflare OAuth client
        - **Client Secret** — from your Cloudflare OAuth client
      - Click **Save**.

4. ### Authorize a user and make your first call

   **Node.js** (`quickstart.mts`)

   ```typescript
   import { ScalekitClient } from '@scalekit-sdk/node'
   import 'dotenv/config'
   import { createInterface } from 'node:readline/promises'

   const scalekit = new ScalekitClient(
     process.env.SCALEKIT_ENVIRONMENT_URL,
     process.env.SCALEKIT_CLIENT_ID,
     process.env.SCALEKIT_CLIENT_SECRET,
   )
   const actions = scalekit.actions

   const connector = 'cloudflare'
   const identifier = 'user_123'

   // Generate an authorization link for the user
   const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
   console.log('Authorize Cloudflare:', link)
   const rl = createInterface({ input: process.stdin, output: process.stdout })
   await rl.question('Press Enter after authorizing...')
   rl.close()

   // Make your first call
   const result = await actions.executeTool({
     connector,
     identifier,
     toolName: 'cloudflare_account_list',
     toolInput: {},
   })
   console.log(result)
   ```

   ```bash
   npx tsx quickstart.mts
   ```

   **Python** (`quickstart.py`)

   ```python
   import os
   from scalekit import ScalekitClient
   from dotenv import load_dotenv
   load_dotenv()

   scalekit_client = ScalekitClient(
       env_url=os.getenv("SCALEKIT_ENVIRONMENT_URL"),
       client_id=os.getenv("SCALEKIT_CLIENT_ID"),
       client_secret=os.getenv("SCALEKIT_CLIENT_SECRET"),
   )
   actions = scalekit_client.actions

   connection_name = "cloudflare"
   identifier = "user_123"

   # Generate an authorization link for the user
   link_response = actions.get_authorization_link(
       connection_name=connection_name,
       identifier=identifier,
   )
   print("Authorize Cloudflare:", link_response.link)
   input("Press Enter after authorizing...")

   # Make your first call
   result = actions.execute_tool(
       tool_input={},
       tool_name="cloudflare_account_list",
       connection_name=connection_name,
       identifier=identifier,
   )
   print(result)
   ```

   ```bash
   python quickstart.py
   ```

   Each user signs in once. See [Authorize a user](/agentkit/tools/authorize/) for the full flow and statuses.

## Tools

Pass the exact name to `execute_tool`, with an input like each tool's example. To ask for a tool that's missing, use the [request form](https://scalekitsupport.portal.usepylon.com/forms/request-a-connector-tool).

**Node.js**

```typescript
const result = await actions.executeTool({
  toolName: 'cloudflare_access_application_get',
  toolInput: {
    account_id: '<account_id>',
    app_id: '<app_id>',
  },
  connector: 'cloudflare',
  identifier: 'user_123',
})
```

**Python**

```python
result = actions.execute_tool(
    tool_name="cloudflare_access_application_get",
    tool_input={
        "account_id": "<account_id>",
        "app_id": "<app_id>",
    },
    connection_name="cloudflare",
    identifier="user_123",
)
```

`result.data` is the app's response as JSON, and `result.execution_id` (`executionId` in Node.js) is the ID of the call.

### `cloudflare_access_application_get`

Get Access Application · Read-only

Retrieve details of a single Zero Trust Access application by ID. Use List Access Applications to find an application ID.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `account_id` (`string`, required): The ID of the Cloudflare account
- `app_id` (`string`, required): The ID of the Access application to retrieve

Example input: `{"account_id":"<account_id>","app_id":"<app_id>"}`

### `cloudflare_access_application_list`

List Access Applications · Read-only

List all Zero Trust Access applications configured in a Cloudflare account, with optional filtering by name or domain.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `account_id` (`string`, required): The ID of the Cloudflare account
- `domain` (`string`, optional): Filter applications by domain
- `name` (`string`, optional): Filter applications by name
- `page` (`integer`, optional): Page number of results to return
- `per_page` (`integer`, optional): Number of results per page

Example input: `{"account_id":"<account_id>"}`

### `cloudflare_account_list`

List Accounts · Read-only

List all Cloudflare accounts the current authenticated user has access to, with optional filtering by account name.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `direction` (`string`, optional): Sort direction for results. One of: `asc`, `desc`.
- `name` (`string`, optional): Filter accounts by name (partial match supported)
- `page` (`integer`, optional): Page number of results to return
- `per_page` (`integer`, optional): Number of results per page

Example input: `{}`

### `cloudflare_dns_record_get`

Get DNS Record · Read-only

Retrieve details of a single DNS record by ID. Use List DNS Records to find a record ID.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `dns_record_id` (`string`, required): The unique identifier of the DNS record to retrieve
- `zone_id` (`string`, required): The unique identifier for the zone the record belongs to

Example input: `{"dns_record_id":"<dns_record_id>","zone_id":"<zone_id>"}`

### `cloudflare_dns_record_list`

List DNS Records · Read-only

List, search, sort, and filter DNS records for a Cloudflare zone. Supports filtering by record type, name, and content.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `zone_id` (`string`, required): The unique identifier for the zone to list DNS records from
- `content` (`string`, optional): Filter DNS records by content/value
- `direction` (`string`, optional): Sort direction (asc or desc). One of: `asc`, `desc`.
- `match` (`string`, optional): Whether to match all or any filter conditions. One of: `any`, `all`.
- `name` (`string`, optional): Filter DNS records by name
- `order` (`string`, optional): Field to order results by. One of: `type`, `name`, `content`, `ttl`, `proxied`.
- `page` (`integer`, optional): Page number for pagination (default 1)
- `per_page` (`integer`, optional): Number of results per page (default 20, max 100)
- `type` (`string`, optional): Filter DNS records by type. One of: `A`, `AAAA`, `CAA`, `CERT`, `CNAME`, `DNSKEY`, `DS`, `HTTPS`, `LOC`, `MX`, `NAPTR`, `NS`, `PTR`, `SMIMEA`, `SPF`, `SRV`, `SSHFP`, `SVCB`, `TLSA`, `TXT`, `URI`.

Example input: `{"zone_id":"<zone_id>"}`

### `cloudflare_firewall_rule_list`

List Firewall Rules · Read-only

List the firewall rules configured on a Cloudflare zone, including their filter expressions and actions.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `zone_id` (`string`, required): The unique identifier for the zone to list firewall rules from
- `page` (`integer`, optional): Page number for pagination (default 1)
- `per_page` (`integer`, optional): Number of results per page (default 20, max 100)

Example input: `{"zone_id":"<zone_id>"}`

### `cloudflare_load_balancer_list`

List Load Balancers · Read-only

List the Load Balancers configured on a Cloudflare zone.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `zone_id` (`string`, required): The unique identifier for the zone to list load balancers from

Example input: `{"zone_id":"<zone_id>"}`

### `cloudflare_page_rule_list`

List Page Rules · Read-only

List the page rules configured on a Cloudflare zone, including their URL targets, actions, and status.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `zone_id` (`string`, required): The unique identifier for the zone to list page rules from
- `status` (`string`, optional): Filter page rules by status. One of: `active`, `disabled`.

Example input: `{"zone_id":"<zone_id>"}`

### `cloudflare_pages_project_list`

List Pages Projects · Read-only

List Cloudflare Pages projects in an account.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `account_id` (`string`, required): The Cloudflare account identifier

Example input: `{"account_id":"<account_id>"}`

### `cloudflare_user_get`

Get Current User · Read-only

Retrieve the profile details of the currently authenticated Cloudflare user, including name, email, and account memberships.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs: none.

Example input: `{}`

### `cloudflare_worker_route_list`

List Worker Routes · Read-only

List the Worker routes configured on a Cloudflare zone, showing which URL patterns dispatch to which Worker script.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `zone_id` (`string`, required): The unique identifier for the zone to list routes from

Example input: `{"zone_id":"<zone_id>"}`

### `cloudflare_worker_script_get`

Get Worker Script · Read-only

Download the raw JavaScript source of a Cloudflare Worker script by name. Use List Worker Scripts to find a script name.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `account_id` (`string`, required): The Cloudflare account identifier
- `script_name` (`string`, required): The name of the Worker script to retrieve

Example input: `{"account_id":"<account_id>","script_name":"<script_name>"}`

### `cloudflare_worker_script_list`

List Worker Scripts · Read-only

Fetch a list of all uploaded Worker scripts in a Cloudflare account. Returns script names, creation dates, and modification timestamps.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `account_id` (`string`, required): The Cloudflare account identifier

Example input: `{"account_id":"<account_id>"}`

### `cloudflare_zone_analytics_dashboard`

Get Zone Analytics · Read-only

Retrieve aggregate traffic analytics for a Cloudflare zone: requests, bandwidth, threats, and cache statistics over a time window.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `zone_id` (`string`, required): The unique identifier for the zone to fetch analytics for
- `since` (`string`, optional): Start of the analytics window (ISO 8601). Defaults to 6 hours ago.
- `until` (`string`, optional): End of the analytics window (ISO 8601). Defaults to now.

Example input: `{"zone_id":"<zone_id>"}`

### `cloudflare_zone_get`

Get Zone · Read-only

Retrieve details of a single Cloudflare zone by ID, including status, name servers, and plan information. Use List Zones to find a zone ID.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `zone_id` (`string`, required): The unique identifier for the zone to retrieve

Example input: `{"zone_id":"<zone_id>"}`

### `cloudflare_zone_list`

List Zones · Read-only

List, search, sort, and filter all zones in the Cloudflare account. Returns zone details including status, name servers, and plan information.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `direction` (`string`, optional): Sort direction (asc or desc). One of: `asc`, `desc`.
- `match` (`string`, optional): Whether to match all or any filter conditions. One of: `any`, `all`.
- `name` (`string`, optional): Filter zones by domain name (exact match)
- `order` (`string`, optional): Field to order results by. One of: `name`, `status`, `account.id`, `account.name`.
- `page` (`integer`, optional): Page number for pagination (default 1)
- `per_page` (`integer`, optional): Number of results per page (default 20, max 50)
- `status` (`string`, optional): Filter zones by status. One of: `active`, `pending`, `initializing`, `moved`, `deleted`, `deactivated`.

Example input: `{}`

### `cloudflare_zone_setting_get`

Get Zone Setting · Read-only

Retrieve the current value of a single zone setting, such as ssl, always_use_https, min_tls_version, security_level, or cache_level.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `setting_name` (`string`, required): The name of the setting to retrieve
- `zone_id` (`string`, required): The unique identifier for the zone whose setting to retrieve

Example input: `{"setting_name":"<setting_name>","zone_id":"<zone_id>"}`

### `cloudflare_access_application_create`

Create Access Application · Write

Create a new Zero Trust Access application to protect a domain behind Cloudflare Access authentication policies.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `account_id` (`string`, required): The ID of the Cloudflare account
- `domain` (`string`, required): The domain (and optional path) this application protects
- `name` (`string`, required): Display name of the application
- `session_duration` (`string`, optional): How long an authenticated session stays valid before re-authentication is required
- `type` (`string`, optional): Type of Access application

Example input: `{"account_id":"<account_id>","domain":"<domain>","name":"<name>"}`

### `cloudflare_dns_record_create`

Create DNS Record · Write

Create a new DNS record in a Cloudflare zone.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `content` (`string`, required): DNS record content/value
- `name` (`string`, required): DNS record name (the subdomain or root domain)
- `type` (`string`, required): DNS record type. One of: `A`, `AAAA`, `CAA`, `CERT`, `CNAME`, `DNSKEY`, `DS`, `HTTPS`, `LOC`, `MX`, `NAPTR`, `NS`, `PTR`, `SMIMEA`, `SPF`, `SRV`, `SSHFP`, `SVCB`, `TLSA`, `TXT`, `URI`.
- `zone_id` (`string`, required): The unique identifier for the zone to create the record in
- `priority` (`integer`, optional): Priority for MX or SRV records
- `proxied` (`boolean`, optional): Whether the record is proxied through Cloudflare (orange-clouded)
- `ttl` (`integer`, optional): Time to live in seconds. 1 means automatic.

Example input: `{"content":"<content>","name":"<name>","type":"A","zone_id":"<zone_id>"}`

### `cloudflare_dns_record_update`

Update DNS Record · Write

Replace an existing DNS record's type, name, and content. This is a full update — provide all fields you want the record to have, not just the ones changing.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `content` (`string`, required): DNS record content/value
- `dns_record_id` (`string`, required): The unique identifier of the DNS record to update
- `name` (`string`, required): DNS record name (the subdomain or root domain)
- `type` (`string`, required): DNS record type. One of: `A`, `AAAA`, `CAA`, `CERT`, `CNAME`, `DNSKEY`, `DS`, `HTTPS`, `LOC`, `MX`, `NAPTR`, `NS`, `PTR`, `SMIMEA`, `SPF`, `SRV`, `SSHFP`, `SVCB`, `TLSA`, `TXT`, `URI`.
- `zone_id` (`string`, required): The unique identifier for the zone the record belongs to
- `priority` (`integer`, optional): Priority for MX or SRV records
- `proxied` (`boolean`, optional): Whether the record is proxied through Cloudflare (orange-clouded)
- `ttl` (`integer`, optional): Time to live in seconds. 1 means automatic.

Example input: `{"content":"<content>","dns_record_id":"<dns_record_id>","name":"<name>","type":"A","zone_id":"<zone_id>"}`

### `cloudflare_firewall_rule_create`

Create Firewall Rule · Write

Create a firewall rule on a Cloudflare zone that takes an action (block, challenge, allow, log, etc.) on requests matching a filter expression.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `action` (`string`, required): Action to take when a request matches the expression. One of: `block`, `challenge`, `js_challenge`, `managed_challenge`, `allow`, `log`, `bypass`.
- `expression` (`string`, required): Cloudflare filter expression that requests must match to trigger this rule
- `zone_id` (`string`, required): The unique identifier for the zone to create the rule in
- `description` (`string`, optional): Description of the firewall rule
- `paused` (`boolean`, optional): Whether the rule is paused (inactive) on creation

Example input: `{"action":"block","expression":"<expression>","zone_id":"<zone_id>"}`

### `cloudflare_load_balancer_create`

Create Load Balancer · Write

Create a new Load Balancer on a Cloudflare zone, distributing traffic for a hostname across one or more origin pools.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `default_pools` (`array`, required): Ordered list of pool IDs ordinarily used to load balance traffic
- `fallback_pool` (`string`, required): Pool ID used when all default_pools are unhealthy
- `name` (`string`, required): The DNS hostname this load balancer will respond on
- `zone_id` (`string`, required): The unique identifier for the zone to create the load balancer in
- `description` (`string`, optional): Description of this load balancer
- `enabled` (`boolean`, optional): Whether the load balancer is enabled
- `proxied` (`boolean`, optional): Whether the hostname should be proxied through Cloudflare
- `session_affinity` (`string`, optional): Session affinity method used to bind a client to a origin. One of: `none`, `cookie`, `ip_cookie`, `header`.
- `steering_policy` (`string`, optional): How traffic is steered across default_pools. One of: `off`, `geo`, `dynamic_latency`, `random`, `proximity`, `least_outstanding_requests`, `least_connections`.
- `ttl` (`integer`, optional): DNS TTL in seconds for this load balancer's hostname

Example input: `{"default_pools":[],"fallback_pool":"<fallback_pool>","name":"<name>","zone_id":"<zone_id>"}`

### `cloudflare_page_rule_create`

Create Page Rule · Write

Create a page rule on a Cloudflare zone that applies one or more settings to requests matching a URL pattern.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `actions` (`array`, required): JSON array of {id, value} action objects to apply, e.g. cache_level, forwarding_url, always_use_https
- `url_pattern` (`string`, required): URL pattern that requests must match to trigger this rule
- `zone_id` (`string`, required): The unique identifier for the zone to create the page rule in
- `priority` (`integer`, optional): Priority order when multiple page rules match the same request. Higher numbers take precedence.
- `status` (`string`, optional): Whether the page rule is active immediately. One of: `active`, `disabled`.

Example input: `{"actions":[],"url_pattern":"<url_pattern>","zone_id":"<zone_id>"}`

### `cloudflare_ruleset_entrypoint_update`

Update Ruleset Phase Entry Point · Write

Deploy or update the active ruleset for a phase (e.g. http_request_firewall_custom for WAF custom rules) on a Cloudflare zone. This replaces the entire set of rules for that phase, so include every rule you want active, not just the ones you're changing.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `phase_name` (`string`, required): The ruleset phase to deploy to
- `rules` (`array`, required): Array of rule objects to make up this phase's ruleset
- `zone_id` (`string`, required): The unique identifier for the zone whose ruleset phase to update
- `description` (`string`, optional): Description for this ruleset

Example input: `{"phase_name":"<phase_name>","rules":[],"zone_id":"<zone_id>"}`

### `cloudflare_worker_route_create`

Create Worker Route · Write

Create a Worker route on a Cloudflare zone that dispatches matching requests to a Worker script. Use List Worker Scripts to find a script name first.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `pattern` (`string`, required): URL pattern that triggers this route
- `zone_id` (`string`, required): The unique identifier for the zone to create the route in
- `script` (`string`, optional): Name of the Worker script to dispatch matching requests to

Example input: `{"pattern":"<pattern>","zone_id":"<zone_id>"}`

### `cloudflare_zone_create`

Create Zone · Write

Add a new domain (zone) to a Cloudflare account. After creation, update your domain's name servers to the ones Cloudflare returns to activate it.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `account_id` (`string`, required): The Cloudflare account to create the zone under
- `name` (`string`, required): The domain name to add as a zone
- `jump_start` (`boolean`, optional): Automatically scan for existing DNS records when the zone is created
- `type` (`string`, optional): Whether Cloudflare hosts the full zone or only a partial (CNAME setup) zone. One of: `full`, `partial`.

Example input: `{"account_id":"<account_id>","name":"<name>"}`

### `cloudflare_zone_purge_cache`

Purge Cache · Write

Purge cached content for a Cloudflare zone. Purge everything, or scope the purge to specific file URLs, cache tags, or hostnames. Provide at most one of files, tags, or hosts when not purging everything.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `zone_id` (`string`, required): The unique identifier for the zone whose cache to purge
- `files` (`array`, optional): JSON array of exact file URLs to purge from cache
- `hosts` (`array`, optional): JSON array of hostnames to purge all cached content for
- `purge_everything` (`boolean`, optional): Purge all cached content for the zone
- `tags` (`array`, optional): JSON array of Cache-Tag values to purge

Example input: `{"zone_id":"<zone_id>"}`

### `cloudflare_zone_setting_update`

Update Zone Setting · Write

Change the value of a single zone setting, such as ssl, always_use_https, min_tls_version, security_level, or cache_level. Use Get Zone Setting first to see the current value and accepted options.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `setting_name` (`string`, required): The name of the setting to update
- `value` (`string`, required): The new value for the setting. Most Cloudflare settings take a string such as 'on', 'off', 'strict', or 'full'.
- `zone_id` (`string`, required): The unique identifier for the zone whose setting to update

Example input: `{"setting_name":"<setting_name>","value":"<value>","zone_id":"<zone_id>"}`

### `cloudflare_access_application_delete`

Delete Access Application · Destructive

Permanently delete a Zero Trust Access application and its policies. The protected domain becomes unprotected by Access. This cannot be undone.

Read only: no. Destructive: yes. Idempotent (safe to retry): no.

Inputs:

- `account_id` (`string`, required): The ID of the Cloudflare account
- `app_id` (`string`, required): The ID of the Access application to delete

Example input: `{"account_id":"<account_id>","app_id":"<app_id>"}`

### `cloudflare_dns_record_delete`

Delete DNS Record · Destructive

Permanently delete a DNS record from a Cloudflare zone. This cannot be undone.

Read only: no. Destructive: yes. Idempotent (safe to retry): no.

Inputs:

- `dns_record_id` (`string`, required): The unique identifier of the DNS record to delete
- `zone_id` (`string`, required): The unique identifier for the zone the record belongs to

Example input: `{"dns_record_id":"<dns_record_id>","zone_id":"<zone_id>"}`

### `cloudflare_worker_script_delete`

Delete Worker Script · Destructive

Permanently delete a Cloudflare Worker script by name. Any routes or triggers bound to it stop working. This cannot be undone.

Read only: no. Destructive: yes. Idempotent (safe to retry): no.

Inputs:

- `account_id` (`string`, required): The Cloudflare account identifier
- `script_name` (`string`, required): The name of the Worker script to delete

Example input: `{"account_id":"<account_id>","script_name":"<script_name>"}`

## Related

Other ways to connect Cloudflare:

- [MCP server](/agentkit/connectors/cloudfaremcp/): Vendor MCP, OAuth, 3 tools

Other Developer Tools connectors ([all 128](/agentkit/connectors/?category=developer-tools)):

- [GitHub](/agentkit/connectors/github/): Scalekit connector, OAuth, 217 tools
- [Microsoft Entra ID](/agentkit/connectors/microsoftentraid/): Scalekit connector, OAuth, 82 tools
- [Datadog](/agentkit/connectors/datadog/): Scalekit connector, API key, 105 tools


---

## More Scalekit documentation

| Resource | What it contains | When to use it |
|----------|-----------------|----------------|
| [/llms.txt](/llms.txt) | Structured index with routing hints per product area | Start here — find which documentation set covers your topic before loading full content |
| [/llms-full.txt](/llms-full.txt) | Complete documentation for all Scalekit products in one file | Use when you need exhaustive context across multiple products or when the topic spans several areas |
| [sitemap-0.xml](https://docs.scalekit.com/sitemap-0.xml) | Full URL list of every documentation page | Use to discover specific page URLs you can fetch for targeted, page-level answers |
