{"openapi":"3.1.0","info":{"title":"Cloudflare R2 (BYOK) API","version":"0.1.0","description":"Cloudflare R2 (BYOK) lets an AI assistant read your own Cloudflare R2 data through the Cloudflare R2 API with a key you supply (Cloudflare API token with R2 storage read permission). Read-only: 10 tools (list_buckets, get_bucket, get_account_metrics, list_objects, list_custom_domains, get_managed_domain, get_cors_policy, get_lifecycle_rules, get_bucket_lock_rules, get_event_notifications). The...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-cloudflare-r2.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-cloudflare-r2/docs"},"termsOfService":"https://connectorbay.com/byok-cloudflare-r2/terms"},"servers":[{"url":"https://byok-cloudflare-r2.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-cloudflare-r2/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_buckets":{"post":{"operationId":"list_buckets","summary":"List the R2 buckets of an account with creation date, location hint and storage class. Pass the returned cursor to get t","description":"List the R2 buckets of an account with creation date, location hint and storage class. Pass the returned cursor to get the next page. Covers buckets in the default jurisdiction only. Use for \"Which R2 buckets do I have and where are they located\".","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"},"name_contains":{"anyOf":[{"maxLength":64,"type":"string"},{"type":"null"}],"default":null,"description":"Only buckets whose name contains this text.","title":"Name Contains"},"direction":{"anyOf":[{"enum":["asc","desc"],"type":"string"},{"type":"null"}],"default":null,"description":"Sort direction by name.","title":"Direction"},"per_page":{"anyOf":[{"maximum":1000,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"How many buckets to return (1 to 1000).","title":"Per Page"},"cursor":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"default":null,"description":"Cursor from the previous answer's result_info.cursor to continue the list.","title":"Cursor"}},"required":["account_id"],"title":"list_bucketsArguments","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_bucket":{"post":{"operationId":"get_bucket","summary":"Get one R2 bucket: creation date, location, storage class and jurisdiction. Covers buckets in the default jurisdiction o","description":"Get one R2 bucket: creation date, location, storage class and jurisdiction. Covers buckets in the default jurisdiction only. Use for \"When was my R2 bucket my-bucket created and which storage class does it use\".","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"},"bucket_name":{"description":"R2 bucket name, as returned by list_buckets.","maxLength":64,"title":"Bucket Name","type":"string"}},"required":["account_id","bucket_name"],"title":"get_bucketArguments","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_metrics":{"post":{"operationId":"get_account_metrics","summary":"Get account-wide R2 storage metrics: object counts and payload and metadata bytes for the standard and infrequent access","description":"Get account-wide R2 storage metrics: object counts and payload and metadata bytes for the standard and infrequent access classes (uploaded and published). Use for \"How much data and how many objects do I store in R2\".","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"}},"required":["account_id"],"title":"get_account_metricsArguments","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_objects":{"post":{"operationId":"list_objects","summary":"List object keys of an R2 bucket with size, storage class, last-modified time and ETag (no object contents). Use prefix ","description":"List object keys of an R2 bucket with size, storage class, last-modified time and ETag (no object contents). Use prefix and delimiter to walk folders and the cursor to page. Covers buckets in the default jurisdiction only. Use for \"What files are under the images/ prefix of my R2 bucket\".","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"},"bucket_name":{"description":"R2 bucket name, as returned by list_buckets.","maxLength":64,"title":"Bucket Name","type":"string"},"prefix":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"default":null,"description":"Only keys starting with this text, for example 'images/'.","title":"Prefix"},"delimiter":{"anyOf":[{"maxLength":5,"type":"string"},{"type":"null"}],"default":null,"description":"Group keys by this character (usually '/') to list folders as result_info.delimited.","title":"Delimiter"},"per_page":{"anyOf":[{"maximum":1000,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"How many objects to return (1 to 1000).","title":"Per Page"},"cursor":{"anyOf":[{"maxLength":1000,"type":"string"},{"type":"null"}],"default":null,"description":"Cursor from the previous answer's result_info.cursor.","title":"Cursor"},"start_after":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"default":null,"description":"Only keys that sort after this key.","title":"Start After"}},"required":["account_id","bucket_name"],"title":"list_objectsArguments","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_custom_domains":{"post":{"operationId":"list_custom_domains","summary":"List the custom domains attached to an R2 bucket with enabled flag, minimum TLS version and ownership and SSL status. Co","description":"List the custom domains attached to an R2 bucket with enabled flag, minimum TLS version and ownership and SSL status. Covers buckets in the default jurisdiction only. Use for \"Which custom domains serve my R2 bucket and are they active\".","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"},"bucket_name":{"description":"R2 bucket name, as returned by list_buckets.","maxLength":64,"title":"Bucket Name","type":"string"}},"required":["account_id","bucket_name"],"title":"list_custom_domainsArguments","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_domain":{"post":{"operationId":"get_managed_domain","summary":"Show whether the public r2.dev development URL is enabled for an R2 bucket and what it is. Covers buckets in the default","description":"Show whether the public r2.dev development URL is enabled for an R2 bucket and what it is. Covers buckets in the default jurisdiction only. Use for \"Is the public r2.dev URL enabled for my R2 bucket\".","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"},"bucket_name":{"description":"R2 bucket name, as returned by list_buckets.","maxLength":64,"title":"Bucket Name","type":"string"}},"required":["account_id","bucket_name"],"title":"get_managed_domainArguments","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_cors_policy":{"post":{"operationId":"get_cors_policy","summary":"Get the CORS rules of an R2 bucket (allowed origins, methods and headers, max age). Covers buckets in the default jurisd","description":"Get the CORS rules of an R2 bucket (allowed origins, methods and headers, max age). Covers buckets in the default jurisdiction only. Use for \"What CORS rules does my R2 bucket have\".","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"},"bucket_name":{"description":"R2 bucket name, as returned by list_buckets.","maxLength":64,"title":"Bucket Name","type":"string"}},"required":["account_id","bucket_name"],"title":"get_cors_policyArguments","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_lifecycle_rules":{"post":{"operationId":"get_lifecycle_rules","summary":"Get the object lifecycle rules of an R2 bucket (prefix conditions, expiry and storage class transitions). Covers buckets","description":"Get the object lifecycle rules of an R2 bucket (prefix conditions, expiry and storage class transitions). Covers buckets in the default jurisdiction only. Use for \"When do objects in my R2 bucket expire\".","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"},"bucket_name":{"description":"R2 bucket name, as returned by list_buckets.","maxLength":64,"title":"Bucket Name","type":"string"}},"required":["account_id","bucket_name"],"title":"get_lifecycle_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/get_bucket_lock_rules":{"post":{"operationId":"get_bucket_lock_rules","summary":"Get the bucket lock (retention) rules of an R2 bucket. Covers buckets in the default jurisdiction only. Use for \"Does my","description":"Get the bucket lock (retention) rules of an R2 bucket. Covers buckets in the default jurisdiction only. Use for \"Does my R2 bucket have retention lock 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"},"bucket_name":{"description":"R2 bucket name, as returned by list_buckets.","maxLength":64,"title":"Bucket Name","type":"string"}},"required":["account_id","bucket_name"],"title":"get_bucket_lock_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/get_event_notifications":{"post":{"operationId":"get_event_notifications","summary":"Get the event notification rules of an R2 bucket (queues receiving object events, with prefix and suffix filters and act","description":"Get the event notification rules of an R2 bucket (queues receiving object events, with prefix and suffix filters and actions). Covers buckets in the default jurisdiction only. Use for \"Which queues get notified when objects change in my R2 bucket\".","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"},"bucket_name":{"description":"R2 bucket name, as returned by list_buckets.","maxLength":64,"title":"Bucket Name","type":"string"}},"required":["account_id","bucket_name"],"title":"get_event_notificationsArguments","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}}}}