{"openapi":"3.1.0","info":{"title":"Cloudflare Rulesets (BYOK) API","version":"0.1.0","description":"Cloudflare Rulesets (BYOK) lets an AI assistant read your own Cloudflare Rulesets data through the Cloudflare Rulesets API with a key you supply (Cloudflare API token with Zone WAF / Account Rulesets read permission). Read-only: 12 tools (list_zone_rulesets, get_zone_ruleset, get_zone_entrypoint, list_zone_entrypoint_versions, list_account_rulesets, get_account_ruleset, get_account_entrypoint,...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-cloudflare-rulesets.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-cloudflare-rulesets/docs"},"termsOfService":"https://connectorbay.com/byok-cloudflare-rulesets/terms"},"servers":[{"url":"https://byok-cloudflare-rulesets.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-cloudflare-rulesets/docs"},"security":[{"upstreamKey":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional. A Pro API key raises rate limits; no credentials are required."},"upstreamKey":{"type":"apiKey","in":"header","name":"X-Upstream-Key","description":"Your own key for the service this connector wraps (bring your own key). Used for that one call only; never stored, logged or cached."}},"schemas":{"Error":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object"}}}}},"paths":{"/v1/tools/list_zone_rulesets":{"post":{"operationId":"list_zone_rulesets","summary":"List the rulesets of a zone (custom, managed, root) with name, kind, phase, version and last update. Rules are not inclu","description":"List the rulesets of a zone (custom, managed, root) with name, kind, phase, version and last update. Rules are not included; use get_zone_ruleset. Use for \"Which rulesets are deployed on my Cloudflare zone\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"zone_id":{"description":"Cloudflare zone id (32-character hex string, from the Cloudflare connector's list_zones).","maxLength":40,"title":"Zone Id","type":"string"},"cursor":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"default":null,"description":"Cursor from the previous answer's result_info.cursors.after to continue.","title":"Cursor"},"per_page":{"anyOf":[{"maximum":50,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"How many rulesets per page (1 to 50).","title":"Per Page"}},"required":["zone_id"],"title":"list_zone_rulesetsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_zone_ruleset":{"post":{"operationId":"get_zone_ruleset","summary":"Get one zone ruleset with all its rules (action, expression, description, enabled flag). Use for \"What rules are in rule","description":"Get one zone ruleset with all its rules (action, expression, description, enabled flag). Use for \"What rules are in ruleset 2f2feab2\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"zone_id":{"description":"Cloudflare zone id (32-character hex string, from the Cloudflare connector's list_zones).","maxLength":40,"title":"Zone Id","type":"string"},"ruleset_id":{"description":"Ruleset id (32-character hex string), as returned by the list tools.","maxLength":40,"title":"Ruleset Id","type":"string"}},"required":["zone_id","ruleset_id"],"title":"get_zone_rulesetArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_zone_entrypoint":{"post":{"operationId":"get_zone_entrypoint","summary":"Get the entry point ruleset of a zone for one phase, with its rules. This is the list of rules that actually run for tha","description":"Get the entry point ruleset of a zone for one phase, with its rules. This is the list of rules that actually run for that phase (for example custom WAF rules or rate limits). Use for \"What are my zone's custom WAF rules\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"zone_id":{"description":"Cloudflare zone id (32-character hex string, from the Cloudflare connector's list_zones).","maxLength":40,"title":"Zone Id","type":"string"},"ruleset_phase":{"description":"Ruleset phase, for example http_request_firewall_custom (custom WAF rules), http_request_firewall_managed (managed rules), http_ratelimit, http_request_redirect or http_request_cache_settings.","enum":["ddos_l4","ddos_l7","http_config_settings","http_custom_errors","http_log_custom_fields","http_ratelimit","http_request_cache_settings","http_request_dynamic_redirect","http_request_firewall_custom","http_request_firewall_managed","http_request_late_transform","http_request_origin","http_request_redirect","http_request_sanitize","http_request_sbfm","http_request_transform","http_response_cache_settings","http_response_compression","http_response_firewall_custom","http_response_firewall_managed","http_response_headers_transform","magic_transit","magic_transit_ids_managed","magic_transit_managed","magic_transit_ratelimit"],"title":"Ruleset Phase","type":"string"}},"required":["zone_id","ruleset_phase"],"title":"get_zone_entrypointArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_zone_entrypoint_versions":{"post":{"operationId":"list_zone_entrypoint_versions","summary":"List the saved versions of the zone entry point ruleset for a phase. Use for \"How many versions of my zone's custom WAF ","description":"List the saved versions of the zone entry point ruleset for a phase. Use for \"How many versions of my zone's custom WAF rules exist\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"zone_id":{"description":"Cloudflare zone id (32-character hex string, from the Cloudflare connector's list_zones).","maxLength":40,"title":"Zone Id","type":"string"},"ruleset_phase":{"description":"Ruleset phase, for example http_request_firewall_custom (custom WAF rules), http_request_firewall_managed (managed rules), http_ratelimit, http_request_redirect or http_request_cache_settings.","enum":["ddos_l4","ddos_l7","http_config_settings","http_custom_errors","http_log_custom_fields","http_ratelimit","http_request_cache_settings","http_request_dynamic_redirect","http_request_firewall_custom","http_request_firewall_managed","http_request_late_transform","http_request_origin","http_request_redirect","http_request_sanitize","http_request_sbfm","http_request_transform","http_response_cache_settings","http_response_compression","http_response_firewall_custom","http_response_firewall_managed","http_response_headers_transform","magic_transit","magic_transit_ids_managed","magic_transit_managed","magic_transit_ratelimit"],"title":"Ruleset Phase","type":"string"},"cursor":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"default":null,"description":"Cursor from the previous answer's result_info.cursors.after to continue.","title":"Cursor"},"per_page":{"anyOf":[{"maximum":50,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"How many rulesets per page (1 to 50).","title":"Per Page"}},"required":["zone_id","ruleset_phase"],"title":"list_zone_entrypoint_versionsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_account_rulesets":{"post":{"operationId":"list_account_rulesets","summary":"List the rulesets of an account (managed, custom, root) with name, kind, phase, version and last update. Use for \"Which ","description":"List the rulesets of an account (managed, custom, root) with name, kind, phase, version and last update. Use for \"Which account-level rulesets exist\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"account_id":{"description":"Cloudflare account id (32-character hex string shown in the dashboard URL, or from the Cloudflare connector's list_accounts).","maxLength":40,"title":"Account Id","type":"string"},"cursor":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"default":null,"description":"Cursor from the previous answer's result_info.cursors.after to continue.","title":"Cursor"},"per_page":{"anyOf":[{"maximum":50,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"How many rulesets per page (1 to 50).","title":"Per Page"}},"required":["account_id"],"title":"list_account_rulesetsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_account_ruleset":{"post":{"operationId":"get_account_ruleset","summary":"Get one account ruleset with all its rules. Use for \"What rules are in account ruleset 2f2feab2\".","description":"Get one account ruleset with all its rules. Use for \"What rules are in account ruleset 2f2feab2\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"account_id":{"description":"Cloudflare account id (32-character hex string shown in the dashboard URL, or from the Cloudflare connector's list_accounts).","maxLength":40,"title":"Account Id","type":"string"},"ruleset_id":{"description":"Ruleset id (32-character hex string), as returned by the list tools.","maxLength":40,"title":"Ruleset Id","type":"string"}},"required":["account_id","ruleset_id"],"title":"get_account_rulesetArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_account_entrypoint":{"post":{"operationId":"get_account_entrypoint","summary":"Get the entry point ruleset of an account for one phase, with its rules. Use for \"What are my account-level WAF rules\".","description":"Get the entry point ruleset of an account for one phase, with its rules. Use for \"What are my account-level WAF rules\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"account_id":{"description":"Cloudflare account id (32-character hex string shown in the dashboard URL, or from the Cloudflare connector's list_accounts).","maxLength":40,"title":"Account Id","type":"string"},"ruleset_phase":{"description":"Ruleset phase, for example http_request_firewall_custom (custom WAF rules), http_request_firewall_managed (managed rules), http_ratelimit, http_request_redirect or http_request_cache_settings.","enum":["ddos_l4","ddos_l7","http_config_settings","http_custom_errors","http_log_custom_fields","http_ratelimit","http_request_cache_settings","http_request_dynamic_redirect","http_request_firewall_custom","http_request_firewall_managed","http_request_late_transform","http_request_origin","http_request_redirect","http_request_sanitize","http_request_sbfm","http_request_transform","http_response_cache_settings","http_response_compression","http_response_firewall_custom","http_response_firewall_managed","http_response_headers_transform","magic_transit","magic_transit_ids_managed","magic_transit_managed","magic_transit_ratelimit"],"title":"Ruleset Phase","type":"string"}},"required":["account_id","ruleset_phase"],"title":"get_account_entrypointArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_zone_ruleset_version":{"post":{"operationId":"get_zone_ruleset_version","summary":"Get one saved version of a zone ruleset with its rules. Use for \"What did ruleset 2f2feab2 contain in version 3\".","description":"Get one saved version of a zone ruleset with its rules. Use for \"What did ruleset 2f2feab2 contain in version 3\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"zone_id":{"description":"Cloudflare zone id (32-character hex string, from the Cloudflare connector's list_zones).","maxLength":40,"title":"Zone Id","type":"string"},"ruleset_id":{"description":"Ruleset id (32-character hex string), as returned by the list tools.","maxLength":40,"title":"Ruleset Id","type":"string"},"ruleset_version":{"description":"Ruleset version number, as returned by the versions list.","maxLength":10,"title":"Ruleset Version","type":"string"}},"required":["zone_id","ruleset_id","ruleset_version"],"title":"get_zone_ruleset_versionArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_snippet_rules":{"post":{"operationId":"list_snippet_rules","summary":"List the zone snippet rules that decide when each Cloudflare Snippet runs (expression, snippet name, enabled). Use for \"","description":"List the zone snippet rules that decide when each Cloudflare Snippet runs (expression, snippet name, enabled). Use for \"When do my Cloudflare Snippets run\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"zone_id":{"description":"Cloudflare zone id (32-character hex string, from the Cloudflare connector's list_zones).","maxLength":40,"title":"Zone Id","type":"string"}},"required":["zone_id"],"title":"list_snippet_rulesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_snippets":{"post":{"operationId":"list_snippets","summary":"List the Cloudflare Snippets of a zone with name and dates (code is not returned). Use for \"Which Snippets are deployed ","description":"List the Cloudflare Snippets of a zone with name and dates (code is not returned). Use for \"Which Snippets are deployed on my zone\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"zone_id":{"description":"Cloudflare zone id (32-character hex string, from the Cloudflare connector's list_zones).","maxLength":40,"title":"Zone Id","type":"string"},"per_page":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":25,"description":"How many snippets per page.","title":"Per Page"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"}},"required":["zone_id"],"title":"list_snippetsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_managed_transforms":{"post":{"operationId":"get_managed_transforms","summary":"List the Managed Transforms of a zone (request and response header transforms) with enabled and conflict flags. Use for ","description":"List the Managed Transforms of a zone (request and response header transforms) with enabled and conflict flags. Use for \"Which Managed Transforms are enabled on my zone\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"zone_id":{"description":"Cloudflare zone id (32-character hex string, from the Cloudflare connector's list_zones).","maxLength":40,"title":"Zone Id","type":"string"}},"required":["zone_id"],"title":"get_managed_transformsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_url_normalization":{"post":{"operationId":"get_url_normalization","summary":"Get the URL normalization settings of a zone: normalization type and scope. Use for \"How does my zone normalize incoming","description":"Get the URL normalization settings of a zone: normalization type and scope. Use for \"How does my zone normalize incoming URLs\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"zone_id":{"description":"Cloudflare zone id (32-character hex string, from the Cloudflare connector's list_zones).","maxLength":40,"title":"Zone Id","type":"string"}},"required":["zone_id"],"title":"get_url_normalizationArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}}}}