{"openapi":"3.1.0","info":{"title":"Bitbucket Repository Rules (BYOK) API","version":"0.1.0","description":"Bitbucket Repository Rules (BYOK) lets an AI assistant read your own Bitbucket Repository Rules data through the Bitbucket Repository Rules API with a key you supply (Atlassian API token with Bitbucket read scopes (repository and pull request)). Read-only: 9 tools (list_branch_restrictions, get_branch_restriction, get_branching_model, get_effective_branching_model,...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-bitbucket-repo-rules.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-bitbucket-repo-rules/docs"},"termsOfService":"https://connectorbay.com/byok-bitbucket-repo-rules/terms"},"servers":[{"url":"https://byok-bitbucket-repo-rules.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-bitbucket-repo-rules/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_branch_restrictions":{"post":{"operationId":"list_branch_restrictions","summary":"List a repository's branch permission and merge check rules: kind (push, delete, force, require_approvals_to_merge ...),","description":"List a repository's branch permission and merge check rules: kind (push, delete, force, require_approvals_to_merge ...), branch pattern or type and numeric value. Use for \"Which branch protection rules does myteam/my-repo have\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"workspace":{"description":"Workspace slug (the first part of repository URLs on bitbucket.org), for example 'myteam'.","maxLength":200,"title":"Workspace","type":"string"},"repo_slug":{"description":"Repository slug, for example 'my-repo'.","maxLength":200,"title":"Repo Slug","type":"string"},"kind":{"anyOf":[{"maxLength":80,"type":"string"},{"type":"null"}],"default":null,"description":"Only rules of this kind, for example 'push' or 'require_passing_builds_to_merge'.","title":"Kind"},"pattern":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only rules applied to branches matching this pattern.","title":"Pattern"},"pagelen":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":25,"description":"How many results per page (1 to 100, default 25).","title":"Pagelen"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1. The answer's next field holds the link to the following page when there is one.","title":"Page"}},"required":["workspace","repo_slug"],"title":"list_branch_restrictionsArguments","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_branch_restriction":{"post":{"operationId":"get_branch_restriction","summary":"Get one branch restriction rule by id: kind, match kind, branch type or pattern and value. Use for \"Show branch rule 7 o","description":"Get one branch restriction rule by id: kind, match kind, branch type or pattern and value. Use for \"Show branch rule 7 of myteam/my-repo\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"workspace":{"description":"Workspace slug (the first part of repository URLs on bitbucket.org), for example 'myteam'.","maxLength":200,"title":"Workspace","type":"string"},"repo_slug":{"description":"Repository slug, for example 'my-repo'.","maxLength":200,"title":"Repo Slug","type":"string"},"rule_id":{"description":"Numeric id of the rule (see list_branch_restrictions).","maxLength":20,"title":"Rule Id","type":"string"}},"required":["workspace","repo_slug","rule_id"],"title":"get_branch_restrictionArguments","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_branching_model":{"post":{"operationId":"get_branching_model","summary":"Get the repository's branching model: branch type prefixes (feature, bugfix, release, hotfix) and the development and pr","description":"Get the repository's branching model: branch type prefixes (feature, bugfix, release, hotfix) and the development and production branches. Use for \"What branching model does myteam/my-repo use\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"workspace":{"description":"Workspace slug (the first part of repository URLs on bitbucket.org), for example 'myteam'.","maxLength":200,"title":"Workspace","type":"string"},"repo_slug":{"description":"Repository slug, for example 'my-repo'.","maxLength":200,"title":"Repo Slug","type":"string"}},"required":["workspace","repo_slug"],"title":"get_branching_modelArguments","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_effective_branching_model":{"post":{"operationId":"get_effective_branching_model","summary":"Get the branching model actually applied to the repository (repository setting or project default). Use for \"Which branc","description":"Get the branching model actually applied to the repository (repository setting or project default). Use for \"Which branching model is currently applied to myteam/my-repo\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"workspace":{"description":"Workspace slug (the first part of repository URLs on bitbucket.org), for example 'myteam'.","maxLength":200,"title":"Workspace","type":"string"},"repo_slug":{"description":"Repository slug, for example 'my-repo'.","maxLength":200,"title":"Repo Slug","type":"string"}},"required":["workspace","repo_slug"],"title":"get_effective_branching_modelArguments","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_effective_default_reviewers":{"post":{"operationId":"list_effective_default_reviewers","summary":"List the people automatically added as reviewers to new pull requests (repository plus project defaults) with their revi","description":"List the people automatically added as reviewers to new pull requests (repository plus project defaults) with their reviewer type. Use for \"Who is automatically added as reviewer in myteam/my-repo\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"workspace":{"description":"Workspace slug (the first part of repository URLs on bitbucket.org), for example 'myteam'.","maxLength":200,"title":"Workspace","type":"string"},"repo_slug":{"description":"Repository slug, for example 'my-repo'.","maxLength":200,"title":"Repo Slug","type":"string"},"pagelen":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":25,"description":"How many results per page (1 to 100, default 25).","title":"Pagelen"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1. The answer's next field holds the link to the following page when there is one.","title":"Page"}},"required":["workspace","repo_slug"],"title":"list_effective_default_reviewersArguments","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_merge_queues":{"post":{"operationId":"list_merge_queues","summary":"List the merge queues of a repository with uuid, name and state (ACTIVE, PAUSED, DRAINING, SUSPENDED, INACTIVE); optiona","description":"List the merge queues of a repository with uuid, name and state (ACTIVE, PAUSED, DRAINING, SUSPENDED, INACTIVE); optionally for one target branch. Use for \"Does myteam/my-repo have a merge queue and is it active\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"workspace":{"description":"Workspace slug (the first part of repository URLs on bitbucket.org), for example 'myteam'.","maxLength":200,"title":"Workspace","type":"string"},"repo_slug":{"description":"Repository slug, for example 'my-repo'.","maxLength":200,"title":"Repo Slug","type":"string"},"target_branch":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only queues for this target branch name.","title":"Target Branch"},"pagelen":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":10,"description":"How many results per page (1 to 100, default 10).","title":"Pagelen"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1. The answer's next field holds the link to the following page when there is one.","title":"Page"}},"required":["workspace","repo_slug"],"title":"list_merge_queuesArguments","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_merge_queue":{"post":{"operationId":"get_merge_queue","summary":"Get one merge queue: uuid, name and state. Use for \"What is the state of merge queue {6a718293-0000-4000-8000-0000000000","description":"Get one merge queue: uuid, name and state. Use for \"What is the state of merge queue {6a718293-0000-4000-8000-000000000006}\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"workspace":{"description":"Workspace slug (the first part of repository URLs on bitbucket.org), for example 'myteam'.","maxLength":200,"title":"Workspace","type":"string"},"repo_slug":{"description":"Repository slug, for example 'my-repo'.","maxLength":200,"title":"Repo Slug","type":"string"},"merge_queue_uuid":{"description":"UUID of the merge queue including braces, for example '{6a718293-0000-4000-8000-000000000006}' (see list_merge_queues).","maxLength":60,"title":"Merge Queue Uuid","type":"string"}},"required":["workspace","repo_slug","merge_queue_uuid"],"title":"get_merge_queueArguments","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_merge_queue_pull_requests":{"post":{"operationId":"list_merge_queue_pull_requests","summary":"List the pull requests waiting in a merge queue: status, rank, queued time and pull request id, title and state. Use for","description":"List the pull requests waiting in a merge queue: status, rank, queued time and pull request id, title and state. Use for \"Which pull requests are queued for merge in myteam/my-repo\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"workspace":{"description":"Workspace slug (the first part of repository URLs on bitbucket.org), for example 'myteam'.","maxLength":200,"title":"Workspace","type":"string"},"repo_slug":{"description":"Repository slug, for example 'my-repo'.","maxLength":200,"title":"Repo Slug","type":"string"},"merge_queue_uuid":{"description":"UUID of the merge queue including braces, for example '{6a718293-0000-4000-8000-000000000006}' (see list_merge_queues).","maxLength":60,"title":"Merge Queue Uuid","type":"string"},"pagelen":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":10,"description":"How many results per page (1 to 100, default 10).","title":"Pagelen"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1. The answer's next field holds the link to the following page when there is one.","title":"Page"}},"required":["workspace","repo_slug","merge_queue_uuid"],"title":"list_merge_queue_pull_requestsArguments","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_forks":{"post":{"operationId":"list_forks","summary":"List the forks of a repository with full name, privacy, language, size and last update. Use for \"Who has forked myteam/m","description":"List the forks of a repository with full name, privacy, language, size and last update. Use for \"Who has forked myteam/my-repo\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"workspace":{"description":"Workspace slug (the first part of repository URLs on bitbucket.org), for example 'myteam'.","maxLength":200,"title":"Workspace","type":"string"},"repo_slug":{"description":"Repository slug, for example 'my-repo'.","maxLength":200,"title":"Repo Slug","type":"string"},"role":{"anyOf":[{"enum":["admin","contributor","member","owner"],"type":"string"},{"type":"null"}],"default":null,"description":"Only forks where the key's user has this role.","title":"Role"},"pagelen":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":25,"description":"How many results per page (1 to 100, default 25).","title":"Pagelen"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1. The answer's next field holds the link to the following page when there is one.","title":"Page"}},"required":["workspace","repo_slug"],"title":"list_forksArguments","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}}}}