{"openapi":"3.1.0","info":{"title":"Bitbucket (BYOK) API","version":"0.1.0","description":"Bitbucket (BYOK) lets an AI assistant read your own Bitbucket data through the Bitbucket API with a key you supply (Atlassian API token with Bitbucket read scopes). Read-only: 11 tools (get_current_user, list_workspaces, list_repositories, get_repository, list_pull_requests, get_pull_request, list_pull_request_comments, list_commits, list_branches, list_tags, list_pipelines). The BYOK key travels...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-bitbucket.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-bitbucket/docs"},"termsOfService":"https://connectorbay.com/byok-bitbucket/terms"},"servers":[{"url":"https://byok-bitbucket.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-bitbucket/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/get_current_user":{"post":{"operationId":"get_current_user","summary":"Show the Bitbucket account the token belongs to: display name, uuid and creation time. Use for \"Which Bitbucket account ","description":"Show the Bitbucket account the token belongs to: display name, uuid and creation time. Use for \"Which Bitbucket account is my token for\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"get_current_userArguments","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_workspaces":{"post":{"operationId":"list_workspaces","summary":"List the workspaces you belong to with slug, name and whether you administer them. Use for \"Which Bitbucket workspaces a","description":"List the workspaces you belong to with slug, name and whether you administer them. Use for \"Which Bitbucket workspaces am I in\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"administrator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"True for only workspaces you administer.","title":"Administrator"},"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"}},"title":"list_workspacesArguments","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_repositories":{"post":{"operationId":"list_repositories","summary":"List repositories in a workspace with name, language, privacy, size and last update; filter by your role or a query. Use","description":"List repositories in a workspace with name, language, privacy, size and last update; filter by your role or a query. Use for \"What repositories are in the Bitbucket workspace myteam\".","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"},"role":{"anyOf":[{"enum":["admin","contributor","member","owner"],"type":"string"},{"type":"null"}],"default":null,"description":"Only repositories where you have this role.","title":"Role"},"q":{"anyOf":[{"maxLength":300,"type":"string"},{"type":"null"}],"default":null,"description":"Optional Bitbucket filter expression, for example 'name ~ \"fix\"' or 'updated_on > 2026-01-01T00:00:00+00:00'.","title":"Q"},"sort":{"anyOf":[{"maxLength":50,"type":"string"},{"type":"null"}],"default":"-updated_on","description":"Field to sort by, for example '-updated_on' (newest first) or 'name'.","title":"Sort"},"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"],"title":"list_repositoriesArguments","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_repository":{"post":{"operationId":"get_repository","summary":"Get one repository: description, language, size, main branch, project, issue tracker flag, fork policy and dates. Use fo","description":"Get one repository: description, language, size, main branch, project, issue tracker flag, fork policy and dates. Use for \"Tell me about the Bitbucket repository 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_repositoryArguments","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_pull_requests":{"post":{"operationId":"list_pull_requests","summary":"List a repository's pull requests (open by default) with title, state, author, source and destination branch and comment","description":"List a repository's pull requests (open by default) with title, state, author, source and destination branch and comment count. Use for \"Which pull requests are open on 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"},"state":{"anyOf":[{"enum":["OPEN","MERGED","DECLINED","SUPERSEDED"],"type":"string"},{"type":"null"}],"default":null,"description":"Only pull requests in this state; open by default.","title":"State"},"q":{"anyOf":[{"maxLength":300,"type":"string"},{"type":"null"}],"default":null,"description":"Optional Bitbucket filter expression, for example 'name ~ \"fix\"' or 'updated_on > 2026-01-01T00:00:00+00:00'.","title":"Q"},"sort":{"anyOf":[{"maxLength":50,"type":"string"},{"type":"null"}],"default":null,"description":"Field to sort by, for example '-updated_on'.","title":"Sort"},"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_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/get_pull_request":{"post":{"operationId":"get_pull_request","summary":"Get one pull request: title, state, author, branches, comment and task counts, merge commit and dates. Use for \"Show me ","description":"Get one pull request: title, state, author, branches, comment and task counts, merge commit and dates. Use for \"Show me pull request 12 on 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"},"pull_request_id":{"description":"Numeric pull request id.","minimum":1,"title":"Pull Request Id","type":"integer"}},"required":["workspace","repo_slug","pull_request_id"],"title":"get_pull_requestArguments","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_pull_request_comments":{"post":{"operationId":"list_pull_request_comments","summary":"List comments on a pull request with author, raw text, time and inline file path when the comment is on code. Use for \"W","description":"List comments on a pull request with author, raw text, time and inline file path when the comment is on code. Use for \"What comments were left on pull request 12 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"},"pull_request_id":{"description":"Numeric pull request id.","minimum":1,"title":"Pull Request Id","type":"integer"},"sort":{"anyOf":[{"maxLength":50,"type":"string"},{"type":"null"}],"default":"created_on","description":"Field to sort by, for example 'created_on'.","title":"Sort"},"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","pull_request_id"],"title":"list_pull_request_commentsArguments","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_commits":{"post":{"operationId":"list_commits","summary":"List recent commits of a repository (newest first) with hash, message, author name and date; optionally for one branch o","description":"List recent commits of a repository (newest first) with hash, message, author name and date; optionally for one branch or file path. Use for \"What are the latest commits on the main branch 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"},"include":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only commits reachable from this branch, tag or commit.","title":"Include"},"exclude":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Leave out commits reachable from this branch, tag or commit.","title":"Exclude"},"path":{"anyOf":[{"maxLength":300,"type":"string"},{"type":"null"}],"default":null,"description":"Only commits that changed this file or directory.","title":"Path"},"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_commitsArguments","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_branches":{"post":{"operationId":"list_branches","summary":"List a repository's branches with the hash, date and message of the latest commit on each. Use for \"What branches does m","description":"List a repository's branches with the hash, date and message of the latest commit on each. Use for \"What branches 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"},"q":{"anyOf":[{"maxLength":300,"type":"string"},{"type":"null"}],"default":null,"description":"Optional Bitbucket filter expression, for example 'name ~ \"fix\"' or 'updated_on > 2026-01-01T00:00:00+00:00'.","title":"Q"},"sort":{"anyOf":[{"maxLength":50,"type":"string"},{"type":"null"}],"default":"-target.date","description":"Field to sort by, for example '-target.date' (most recently committed first).","title":"Sort"},"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_branchesArguments","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_tags":{"post":{"operationId":"list_tags","summary":"List a repository's tags with the commit hash, date and message. Use for \"What tags does myteam/my-repo have\".","description":"List a repository's tags with the commit hash, date and message. Use for \"What tags 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"},"q":{"anyOf":[{"maxLength":300,"type":"string"},{"type":"null"}],"default":null,"description":"Optional Bitbucket filter expression, for example 'name ~ \"fix\"' or 'updated_on > 2026-01-01T00:00:00+00:00'.","title":"Q"},"sort":{"anyOf":[{"maxLength":50,"type":"string"},{"type":"null"}],"default":"-target.date","description":"Field to sort by, for example '-target.date'.","title":"Sort"},"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_tagsArguments","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_pipelines":{"post":{"operationId":"list_pipelines","summary":"List a repository's Bitbucket Pipelines runs with build number, state, result, branch, creator and time; filter by statu","description":"List a repository's Bitbucket Pipelines runs with build number, state, result, branch, creator and time; filter by status or branch. Use for \"Did the last pipelines on myteam/my-repo pass\".","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"},"status":{"anyOf":[{"enum":["PENDING","BUILDING","PASSED","FAILED","ERROR","STOPPED","PAUSED","HALTED"],"type":"string"},{"type":"null"}],"default":null,"description":"Only pipelines with this status.","title":"Status"},"target_branch":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only pipelines for this branch.","title":"Target Branch"},"sort":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":"-created_on","description":"Sort by created_on, run_creation_date or creator.uuid; prefix '-' for descending.","title":"Sort"},"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_pipelinesArguments","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}}}}