naftiko: 1.0.0-alpha2 info: label: Atlassian Bit Bucket Repositories API — Branches description: 'Atlassian Bit Bucket Repositories API — Branches. 11 operations. Lead operation: Atlassian List Branch Restrictions. Self-contained Naftiko capability covering one Atlassian business surface.' tags: - Atlassian - Branches created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: ATLASSIAN_API_KEY: ATLASSIAN_API_KEY capability: consumes: - type: http namespace: bitbucket-repositories-branches baseUri: https://api.bitbucket.org/2.0 description: Atlassian Bit Bucket Repositories API — Branches business capability. Self-contained, no shared references. resources: - name: repositories-workspace-repo_slug-branch-restrictions path: /repositories/{workspace}/{repo_slug}/branch-restrictions operations: - name: listbranchrestrictions method: GET description: Atlassian List Branch Restrictions outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: kind in: query type: string description: Branch restrictions of this type - name: pattern in: query type: string description: Branch restrictions applied to branches of this pattern - name: createbranchrestrictionrule method: POST description: Atlassian Create Branch Restriction Rule outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: true - name: repositories-workspace-repo_slug-branch-restrictions-id path: /repositories/{workspace}/{repo_slug}/branch-restrictions/{id} operations: - name: deletebranchrestrictionrule method: DELETE description: Atlassian Delete Branch Restriction Rule outputRawFormat: json outputParameters: - name: result type: object value: $. - name: getbranchrestrictionrule method: GET description: Atlassian Get Branch Restriction Rule outputRawFormat: json outputParameters: - name: result type: object value: $. - name: updatebranchrestrictionrule method: PUT description: Atlassian Update Branch Restriction Rule outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: true - name: repositories-workspace-repo_slug-refs path: /repositories/{workspace}/{repo_slug}/refs operations: - name: listbranchesandtags method: GET description: Atlassian List Branches and Tags outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: q in: query type: string description: Query string to narrow down the response as per - name: sort in: query type: string description: Field by which the results should be sorted as per - name: repositories-workspace-repo_slug-refs-branches path: /repositories/{workspace}/{repo_slug}/refs/branches operations: - name: listopenbranches method: GET description: Atlassian List Open Branches outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: q in: query type: string description: Query string to narrow down the response as per - name: sort in: query type: string description: Field by which the results should be sorted as per - name: createbranch method: POST description: Atlassian Create Branch outputRawFormat: json outputParameters: - name: result type: object value: $. - name: repositories-workspace-repo_slug-refs-branches-name path: /repositories/{workspace}/{repo_slug}/refs/branches/{name} operations: - name: deletebranch method: DELETE description: Atlassian Delete Branch outputRawFormat: json outputParameters: - name: result type: object value: $. - name: getbranch method: GET description: Atlassian Get Branch outputRawFormat: json outputParameters: - name: result type: object value: $. - name: repositories-workspace-repo_slug-src path: /repositories/{workspace}/{repo_slug}/src operations: - name: gettherootdirectoryofthemainbranch method: GET description: Atlassian Get the Root Directory of the Main Branch outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: format in: query type: string description: Instead of returning the file's contents, return the (json) meta data for it. authentication: type: bearer token: '{{env.ATLASSIAN_API_KEY}}' exposes: - type: rest namespace: bitbucket-repositories-branches-rest port: 8080 description: REST adapter for Atlassian Bit Bucket Repositories API — Branches. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/repositories/{workspace}/{repo-slug}/branch-restrictions name: repositories-workspace-repo-slug-branch-restrictions description: REST surface for repositories-workspace-repo_slug-branch-restrictions. operations: - method: GET name: listbranchrestrictions description: Atlassian List Branch Restrictions call: bitbucket-repositories-branches.listbranchrestrictions with: kind: rest.kind pattern: rest.pattern outputParameters: - type: object mapping: $. - method: POST name: createbranchrestrictionrule description: Atlassian Create Branch Restriction Rule call: bitbucket-repositories-branches.createbranchrestrictionrule with: body: rest.body outputParameters: - type: object mapping: $. - path: /v1/repositories/{workspace}/{repo-slug}/branch-restrictions/{id} name: repositories-workspace-repo-slug-branch-restrictions-id description: REST surface for repositories-workspace-repo_slug-branch-restrictions-id. operations: - method: DELETE name: deletebranchrestrictionrule description: Atlassian Delete Branch Restriction Rule call: bitbucket-repositories-branches.deletebranchrestrictionrule outputParameters: - type: object mapping: $. - method: GET name: getbranchrestrictionrule description: Atlassian Get Branch Restriction Rule call: bitbucket-repositories-branches.getbranchrestrictionrule outputParameters: - type: object mapping: $. - method: PUT name: updatebranchrestrictionrule description: Atlassian Update Branch Restriction Rule call: bitbucket-repositories-branches.updatebranchrestrictionrule with: body: rest.body outputParameters: - type: object mapping: $. - path: /v1/repositories/{workspace}/{repo-slug}/refs name: repositories-workspace-repo-slug-refs description: REST surface for repositories-workspace-repo_slug-refs. operations: - method: GET name: listbranchesandtags description: Atlassian List Branches and Tags call: bitbucket-repositories-branches.listbranchesandtags with: q: rest.q sort: rest.sort outputParameters: - type: object mapping: $. - path: /v1/repositories/{workspace}/{repo-slug}/refs/branches name: repositories-workspace-repo-slug-refs-branches description: REST surface for repositories-workspace-repo_slug-refs-branches. operations: - method: GET name: listopenbranches description: Atlassian List Open Branches call: bitbucket-repositories-branches.listopenbranches with: q: rest.q sort: rest.sort outputParameters: - type: object mapping: $. - method: POST name: createbranch description: Atlassian Create Branch call: bitbucket-repositories-branches.createbranch outputParameters: - type: object mapping: $. - path: /v1/repositories/{workspace}/{repo-slug}/refs/branches/{name} name: repositories-workspace-repo-slug-refs-branches-name description: REST surface for repositories-workspace-repo_slug-refs-branches-name. operations: - method: DELETE name: deletebranch description: Atlassian Delete Branch call: bitbucket-repositories-branches.deletebranch outputParameters: - type: object mapping: $. - method: GET name: getbranch description: Atlassian Get Branch call: bitbucket-repositories-branches.getbranch outputParameters: - type: object mapping: $. - path: /v1/repositories/{workspace}/{repo-slug}/src name: repositories-workspace-repo-slug-src description: REST surface for repositories-workspace-repo_slug-src. operations: - method: GET name: gettherootdirectoryofthemainbranch description: Atlassian Get the Root Directory of the Main Branch call: bitbucket-repositories-branches.gettherootdirectoryofthemainbranch with: format: rest.format outputParameters: - type: object mapping: $. - type: mcp namespace: bitbucket-repositories-branches-mcp port: 9090 transport: http description: MCP adapter for Atlassian Bit Bucket Repositories API — Branches. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: atlassian-list-branch-restrictions description: Atlassian List Branch Restrictions hints: readOnly: true destructive: false idempotent: true call: bitbucket-repositories-branches.listbranchrestrictions with: kind: tools.kind pattern: tools.pattern outputParameters: - type: object mapping: $. - name: atlassian-create-branch-restriction-rule description: Atlassian Create Branch Restriction Rule hints: readOnly: false destructive: false idempotent: false call: bitbucket-repositories-branches.createbranchrestrictionrule with: body: tools.body outputParameters: - type: object mapping: $. - name: atlassian-delete-branch-restriction-rule description: Atlassian Delete Branch Restriction Rule hints: readOnly: false destructive: true idempotent: true call: bitbucket-repositories-branches.deletebranchrestrictionrule outputParameters: - type: object mapping: $. - name: atlassian-get-branch-restriction-rule description: Atlassian Get Branch Restriction Rule hints: readOnly: true destructive: false idempotent: true call: bitbucket-repositories-branches.getbranchrestrictionrule outputParameters: - type: object mapping: $. - name: atlassian-update-branch-restriction-rule description: Atlassian Update Branch Restriction Rule hints: readOnly: false destructive: false idempotent: true call: bitbucket-repositories-branches.updatebranchrestrictionrule with: body: tools.body outputParameters: - type: object mapping: $. - name: atlassian-list-branches-and-tags description: Atlassian List Branches and Tags hints: readOnly: true destructive: false idempotent: true call: bitbucket-repositories-branches.listbranchesandtags with: q: tools.q sort: tools.sort outputParameters: - type: object mapping: $. - name: atlassian-list-open-branches description: Atlassian List Open Branches hints: readOnly: true destructive: false idempotent: true call: bitbucket-repositories-branches.listopenbranches with: q: tools.q sort: tools.sort outputParameters: - type: object mapping: $. - name: atlassian-create-branch description: Atlassian Create Branch hints: readOnly: false destructive: false idempotent: false call: bitbucket-repositories-branches.createbranch outputParameters: - type: object mapping: $. - name: atlassian-delete-branch description: Atlassian Delete Branch hints: readOnly: false destructive: true idempotent: true call: bitbucket-repositories-branches.deletebranch outputParameters: - type: object mapping: $. - name: atlassian-get-branch description: Atlassian Get Branch hints: readOnly: true destructive: false idempotent: true call: bitbucket-repositories-branches.getbranch outputParameters: - type: object mapping: $. - name: atlassian-get-root-directory-main description: Atlassian Get the Root Directory of the Main Branch hints: readOnly: true destructive: false idempotent: true call: bitbucket-repositories-branches.gettherootdirectoryofthemainbranch with: format: tools.format outputParameters: - type: object mapping: $.