Mandala
Tools

Cloudflare

Manage DNS, domains, certificates, and cache

Usage Instructions

Integrate Cloudflare into the workflow. Manage zones (domains), DNS records, SSL/TLS certificates, zone settings, DNS analytics, and cache purging via the Cloudflare API.

Tools

cloudflare_list_zones

Lists all zones (domains) in the Cloudflare account.

Input

ParameterTypeRequiredDescription
namestringNoFilter zones by domain name (e.g., "example.com")
statusstringNoFilter by zone status: "initializing", "pending", "active", or "moved"
pagenumberNoPage number for pagination (default: 1)
per_pagenumberNoNumber of zones per page (default: 20, max: 50)
accountIdstringNoFilter zones by account ID
orderstringNoSort field (name, status, account.id, account.name, plan.id)
directionstringNoSort direction (asc, desc)
matchstringNoMatch logic for filters (any, all). Default: all
apiKeystringYesCloudflare API Token

Output

ParameterTypeDescription
zonesarrayList of zones/domains
total_countnumberTotal number of zones matching the query

cloudflare_get_zone

Gets details for a specific zone (domain) by its ID.

Input

ParameterTypeRequiredDescription
zoneIdstringYesThe zone ID to retrieve details for
apiKeystringYesCloudflare API Token

Output

ParameterTypeDescription
idstringZone ID
namestringDomain name
statusstringZone status (initializing, pending, active, moved)
pausedbooleanWhether the zone is paused
typestringZone type (full, partial, or secondary)
name_serversarrayAssigned Cloudflare name servers
original_name_serversarrayOriginal name servers before moving to Cloudflare
created_onstringISO 8601 date when the zone was created
modified_onstringISO 8601 date when the zone was last modified
activated_onstringISO 8601 date when the zone was activated
development_modenumberSeconds remaining in development mode (0 = off)
planobjectZone plan information
accountobjectAccount the zone belongs to
ownerobjectZone owner information
metaobjectZone metadata
vanity_name_serversarrayCustom vanity name servers
permissionsarrayUser permissions for the zone

cloudflare_create_zone

Adds a new zone (domain) to the Cloudflare account.

Input

ParameterTypeRequiredDescription
namestringYesThe domain name to add (e.g., "example.com")
accountIdstringYesThe Cloudflare account ID
typestringNoZone type: "full" (Cloudflare manages DNS), "partial" (CNAME setup), or "secondary" (secondary DNS)
apiKeystringYesCloudflare API Token

Output

ParameterTypeDescription
idstringCreated zone ID
namestringDomain name
statusstringZone status (initializing, pending, active, moved)
pausedbooleanWhether the zone is paused
typestringZone type (full, partial, or secondary)
name_serversarrayAssigned Cloudflare name servers
original_name_serversarrayOriginal name servers before moving to Cloudflare
created_onstringISO 8601 date when the zone was created
modified_onstringISO 8601 date when the zone was last modified
activated_onstringISO 8601 date when the zone was activated
development_modenumberSeconds remaining in development mode (0 = off)
planobjectZone plan information
accountobjectAccount the zone belongs to
ownerobjectZone owner information
metaobjectZone metadata
vanity_name_serversarrayCustom vanity name servers
permissionsarrayUser permissions for the zone

cloudflare_delete_zone

Deletes a zone (domain) from the Cloudflare account.

Input

ParameterTypeRequiredDescription
zoneIdstringYesThe zone ID to delete
apiKeystringYesCloudflare API Token

Output

ParameterTypeDescription
idstringDeleted zone ID

cloudflare_list_dns_records

Lists DNS records for a specific zone.

Input

ParameterTypeRequiredDescription
zoneIdstringYesThe zone ID to list DNS records for
typestringNoFilter by record type (e.g., "A", "AAAA", "CNAME", "MX", "TXT")
namestringNoFilter by record name (exact match)
contentstringNoFilter by record content (exact match)
pagenumberNoPage number for pagination (default: 1)
per_pagenumberNoNumber of records per page (default: 100, max: 5000000)
directionstringNoSort direction (asc or desc)
matchstringNoMatch logic for filters: any or all (default: all)
orderstringNoSort field (type, name, content, ttl, proxied)
proxiedbooleanNoFilter by proxy status
searchstringNoFree-text search across record name, content, and value
tagstringNoFilter by an exact tag name
tag_matchstringNoTag filter match logic: any or all. Only affects results when combined with multiple tag filter conditions; has no effect with the single exact-match Tag Filter above.
commentFilterstringNoFilter records by comment content (substring match)
apiKeystringYesCloudflare API Token

Output

ParameterTypeDescription
recordsarrayList of DNS records
total_countnumberTotal number of DNS records matching the query

cloudflare_create_dns_record

Creates a new DNS record for a zone.

Input

ParameterTypeRequiredDescription
zoneIdstringYesThe zone ID to create the DNS record in
typestringYesDNS record type (e.g., "A", "AAAA", "CNAME", "MX", "TXT", "NS", "SRV")
namestringYesDNS record name (e.g., "example.com" or "subdomain.example.com")
contentstringYesDNS record content (e.g., IP address for A records, target for CNAME)
ttlnumberNoTime to live in seconds (1 = automatic, default: 1)
proxiedbooleanNoWhether to enable Cloudflare proxy (default: false)
prioritynumberNoPriority for MX and SRV records
commentstringNoComment for the DNS record
tagsstringNoComma-separated tags for the DNS record
apiKeystringYesCloudflare API Token

Output

ParameterTypeDescription
idstringUnique identifier for the created DNS record
zone_idstringThe ID of the zone the record belongs to
zone_namestringThe name of the zone
typestringDNS record type (A, AAAA, CNAME, MX, TXT, etc.)
namestringDNS record hostname
contentstringDNS record value (e.g., IP address, target hostname)
proxiablebooleanWhether the record can be proxied through Cloudflare
proxiedbooleanWhether Cloudflare proxy is enabled
ttlnumberTime to live in seconds (1 = automatic)
lockedbooleanWhether the record is locked
prioritynumberPriority for MX and SRV records
commentstringComment associated with the record
tagsarrayTags associated with the record
comment_modified_onstringISO 8601 timestamp when the comment was last modified
tags_modified_onstringISO 8601 timestamp when tags were last modified
metaobjectRecord metadata
created_onstringISO 8601 timestamp when the record was created
modified_onstringISO 8601 timestamp when the record was last modified

cloudflare_update_dns_record

Updates an existing DNS record for a zone.

Input

ParameterTypeRequiredDescription
zoneIdstringYesThe zone ID containing the DNS record
recordIdstringYesThe DNS record ID to update
typestringNoDNS record type (e.g., "A", "AAAA", "CNAME", "MX", "TXT")
namestringNoDNS record name
contentstringNoDNS record content (e.g., IP address)
ttlnumberNoTime to live in seconds (1 = automatic)
proxiedbooleanNoWhether to enable Cloudflare proxy
prioritynumberNoPriority for MX and SRV records
commentstringNoComment for the DNS record
tagsstringNoComma-separated tags for the DNS record
apiKeystringYesCloudflare API Token

Output

ParameterTypeDescription
idstringUnique identifier for the updated DNS record
zone_idstringThe ID of the zone the record belongs to
zone_namestringThe name of the zone
typestringDNS record type (A, AAAA, CNAME, MX, TXT, etc.)
namestringDNS record hostname
contentstringDNS record value (e.g., IP address, target hostname)
proxiablebooleanWhether the record can be proxied through Cloudflare
proxiedbooleanWhether Cloudflare proxy is enabled
ttlnumberTime to live in seconds (1 = automatic)
lockedbooleanWhether the record is locked
prioritynumberPriority for MX and SRV records
commentstringComment associated with the record
tagsarrayTags associated with the record
comment_modified_onstringISO 8601 timestamp when the comment was last modified
tags_modified_onstringISO 8601 timestamp when tags were last modified
metaobjectRecord metadata
created_onstringISO 8601 timestamp when the record was created
modified_onstringISO 8601 timestamp when the record was last modified

cloudflare_delete_dns_record

Deletes a DNS record from a zone.

Input

ParameterTypeRequiredDescription
zoneIdstringYesThe zone ID containing the DNS record
recordIdstringYesThe DNS record ID to delete
apiKeystringYesCloudflare API Token

Output

ParameterTypeDescription
idstringDeleted record ID

cloudflare_list_certificates

Lists SSL/TLS certificate packs for a zone.

Input

ParameterTypeRequiredDescription
zoneIdstringYesThe zone ID to list certificates for
statusstringNoFilter certificate packs by status (e.g., "all", "active", "pending")
pagenumberNoPage number of paginated results (default: 1)
per_pagenumberNoNumber of certificate packs per page (default: 20, min: 5, max: 50)
deploystringNoFilter by deployment environment: "staging" or "production"
apiKeystringYesCloudflare API Token

Output

ParameterTypeDescription
certificatesarrayList of SSL/TLS certificate packs
total_countnumberTotal number of certificate packs

cloudflare_get_zone_settings

Gets all settings for a zone including SSL mode, caching level, and security settings.

Input

ParameterTypeRequiredDescription
zoneIdstringYesThe zone ID to get settings for
apiKeystringYesCloudflare API Token

Output

ParameterTypeDescription
settingsarrayList of zone settings

cloudflare_update_zone_setting

Updates a specific zone setting such as SSL mode, security level, cache level, or other configuration.

Input

ParameterTypeRequiredDescription
zoneIdstringYesThe zone ID to update settings for
settingIdstringYesSetting to update (e.g., "ssl", "security_level", "cache_level", "always_use_https", "browser_cache_ttl", "http3", "min_tls_version", "ciphers")
valuestringYesNew value for the setting as a string or JSON string for complex values (e.g., "full" for SSL, "medium" for security_level, "aggressive" for cache_level, '["ECDHE-RSA-AES128-GCM-SHA256"]' for ciphers)
apiKeystringYesCloudflare API Token

Output

ParameterTypeDescription
idstringSetting identifier (e.g., ssl, cache_level, security_level)
valuestringUpdated setting value as a string. Simple values returned as-is (e.g., "full", "on"). Complex values are JSON-stringified.
editablebooleanWhether the setting can be modified for the current zone plan
modified_onstringISO 8601 timestamp when the setting was last modified
time_remainingnumberSeconds remaining until the setting can be modified again (only present for rate-limited settings)

cloudflare_dns_analytics

Gets DNS analytics report for a zone including query counts and trends.

Input

ParameterTypeRequiredDescription
zoneIdstringYesThe zone ID to get DNS analytics for
sincestringNoStart date for analytics (ISO 8601, e.g., "2024-01-01T00:00:00Z") or relative (e.g., "-6h")
untilstringNoEnd date for analytics (ISO 8601, e.g., "2024-01-31T23:59:59Z") or relative (e.g., "now")
metricsstringYesComma-separated metrics to retrieve (e.g., "queryCount,uncachedCount,staleCount,responseTimeAvg,responseTimeMedian,responseTime90th,responseTime99th")
dimensionsstringNoComma-separated dimensions to group by (e.g., "queryName,queryType,responseCode,responseCached,coloName,origin,dayOfWeek,tcp,ipVersion,querySizeBucket,responseSizeBucket")
filtersstringNoFilters to apply to the data (e.g., "queryType==A")
sortstringNoSort order for the result set. Fields must be included in metrics or dimensions (e.g., "+queryCount" or "-responseTimeAvg")
limitnumberNoMaximum number of results to return
apiKeystringYesCloudflare API Token

Output

ParameterTypeDescription
totalsobjectAggregate DNS analytics totals for the entire queried period
minobjectMinimum values across the analytics period
maxobjectMaximum values across the analytics period
dataarrayRaw analytics data rows returned by the Cloudflare DNS analytics report
data_lagnumberProcessing lag in seconds before analytics data becomes available
rowsnumberTotal number of rows in the result set
queryobjectEcho of the query parameters sent to the API

cloudflare_purge_cache

Purges cached content for a zone. Can purge everything or specific files/tags/hosts/prefixes.

Input

ParameterTypeRequiredDescription
zoneIdstringYesThe zone ID to purge cache for
purge_everythingbooleanNoSet to true to purge all cached content. Mutually exclusive with files, tags, hosts, and prefixes
filesstringNoComma-separated list of URLs to purge from cache
tagsstringNoComma-separated list of cache tags to purge (Enterprise only)
hostsstringNoComma-separated list of hostnames to purge (Enterprise only)
prefixesstringNoComma-separated list of URL prefixes to purge (Enterprise only)
apiKeystringYesCloudflare API Token

Output

ParameterTypeDescription
idstringPurge request identifier returned by Cloudflare

Notes

  • Category: tools
  • Type: cloudflare
Cloudflare