> This page is for Agent Handler.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.merge.dev/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.merge.dev/_mcp/server.

# Cloudflare

**Authentication:** API token or global API key. See [Magic Link](/merge-agent-handler/features/magic-link) for the runtime auth flow.

## Sample use cases

* List every WAF rule on `acme.com` and flag rules in `simulate` mode older than 30 days.
* Show me the top blocked countries for `acme.com` over the last 24 hours.
* Purge the cache for `acme.com/blog/*` after the migration deploy.

## Available Tools

#### verify\_token

Verify the current Cloudflare API token is valid and active. Use this to test connectivity and confirm authentication is working correctly.

#### get\_user

Get the current authenticated Cloudflare user's profile information including email, name, and account status.

#### list\_accounts

List all Cloudflare accounts the authenticated user has access to. Supports filtering by name and pagination.

#### get\_account

Get details of a specific Cloudflare account by ID. Use list\_accounts first to find valid account IDs.

#### purge\_cache

Purge cached content for a Cloudflare zone.

#### list\_dns\_records

List DNS records for a Cloudflare zone. Supports filtering by record type (A, AAAA, CNAME, MX, TXT, etc.), name, content, and proxy status with pagination. Use list\_zones first to get the zone ID.

#### get\_dns\_record

Get details of a specific DNS record by ID. Use list\_dns\_records first to find the record ID and zone ID.

#### create\_dns\_record

Create a new DNS record in a Cloudflare zone.

#### update\_dns\_record

Update an existing DNS record. Only specified fields are modified. Use list\_dns\_records to find the record ID and zone ID.

#### delete\_dns\_record

Delete a DNS record from a Cloudflare zone. This is irreversible. Use list\_dns\_records to find the record ID and zone ID.

#### list\_zone\_rulesets

List all rulesets for a Cloudflare zone including WAF custom rules, rate limiting rules, transform rules, and cache rules. Use list\_zones first to get the zone ID.

#### get\_zone\_ruleset

Get a specific ruleset with all its rules. Use list\_zone\_rulesets first to find the ruleset ID.

#### create\_zone\_ruleset

Create a new zone ruleset with WAF custom rules.

#### update\_zone\_ruleset

Update a zone ruleset by replacing all its rules.

#### delete\_zone\_ruleset

Delete a zone ruleset and all its rules. This is irreversible. Use list\_zone\_rulesets to find the ruleset ID.

#### list\_zone\_settings

List all settings for a Cloudflare zone including SSL mode, security level, caching, and performance options. Use list\_zones first to get the zone ID.

#### get\_zone\_setting

Get a specific zone setting value. Common settings: ssl, security\_level, min\_tls\_version, always\_use\_https, development\_mode, cache\_level, browser\_cache\_ttl. Use list\_zones first to get the zone ID.

#### update\_zone\_setting

Update a zone setting. Examples: ssl='strict', security\_level='high', min\_tls\_version='1.2', always\_use\_https='on', development\_mode='on'. Use get\_zone\_setting first to see the current value.

#### list\_zones

List all Cloudflare zones (domains). Supports filtering by domain name, status, and account ID with pagination. Returns zone IDs needed for DNS, settings, and cache operations.

#### get\_zone

Get detailed information about a specific Cloudflare zone including nameservers, plan, and status. Use list\_zones first to find the zone ID.

#### create\_zone

Add a new domain to Cloudflare. Requires the domain name and account ID. Use list\_accounts to find valid account IDs. After creation, update DNS nameservers at your registrar.

#### delete\_zone

Permanently remove a zone (domain) from Cloudflare. This is irreversible and removes all associated DNS records and settings. Use list\_zones to find the zone ID.

#### browser\_extract\_json

Extract structured JSON data from a rendered page using AI via Cloudflare Browser Rendering.

#### browser\_fetch\_content

Fetch rendered HTML content from a URL using Cloudflare Browser Rendering. Executes JavaScript before extracting content.

#### browser\_fetch\_markdown

Extract clean markdown from a URL using Cloudflare Browser Rendering. Renders JavaScript before extracting content.

#### browser\_get\_crawl\_status

Get the status and results of a crawl job started with browser\_start\_crawl. Returns job status, progress, and crawled page records with pagination.

#### browser\_get\_links

Extract all links from a rendered page using Cloudflare Browser Rendering. Returns a list of URLs found on the page.

#### browser\_render\_pdf

Render a URL as a PDF document using Cloudflare Browser Rendering. Returns base64-encoded PDF. Supports paper format, landscape, and margin options.

#### browser\_scrape\_page

Scrape specific elements from a rendered page using CSS selectors via Cloudflare Browser Rendering.

#### browser\_start\_crawl

Start an async crawl job using Cloudflare Browser Rendering. Returns a job ID. Use browser\_get\_crawl\_status to poll for results.

#### browser\_take\_screenshot

Take a screenshot of a URL using Cloudflare Browser Rendering. Returns base64-encoded image.

#### browser\_take\_snapshot

Take a full snapshot of a page (screenshot + HTML content) using Cloudflare Browser Rendering. Returns both a base64 screenshot and the rendered HTML.