naftiko: 1.0.0-alpha2 info: label: Atlassian Bit Bucket Repositories API — Directories description: 'Atlassian Bit Bucket Repositories API — Directories. 2 operations. Lead operation: Atlassian Get the Root Directory of the Main Branch. Self-contained Naftiko capability covering one Atlassian business surface.' tags: - Atlassian - Directories 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-directories baseUri: https://api.bitbucket.org/2.0 description: Atlassian Bit Bucket Repositories API — Directories business capability. Self-contained, no shared references. resources: - 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. - name: repositories-workspace-repo_slug-src-commit-path path: /repositories/{workspace}/{repo_slug}/src/{commit}/{path} operations: - name: getfileordirectorycontents method: GET description: Atlassian Get File or Directory Contents outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: format in: query type: string description: If 'meta' is provided, returns the (json) meta data for the contents of the file. If 'rendered' is provided, returns the contents of a non-binary file in HTML- - name: q in: query type: string description: Optional filter expression as per [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering). - name: sort in: query type: string description: Optional sorting parameter as per [filtering and sorting](/cloud/bitbucket/rest/intro/#sorting-query-results). - name: max_depth in: query type: integer description: If provided, returns the contents of the repository and its subdirectories recursively until the specified max_depth of nested directories. When omitted, this d authentication: type: bearer token: '{{env.ATLASSIAN_API_KEY}}' exposes: - type: rest namespace: bitbucket-repositories-directories-rest port: 8080 description: REST adapter for Atlassian Bit Bucket Repositories API — Directories. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - 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-directories.gettherootdirectoryofthemainbranch with: format: rest.format outputParameters: - type: object mapping: $. - path: /v1/repositories/{workspace}/{repo-slug}/src/{commit}/{path} name: repositories-workspace-repo-slug-src-commit-path description: REST surface for repositories-workspace-repo_slug-src-commit-path. operations: - method: GET name: getfileordirectorycontents description: Atlassian Get File or Directory Contents call: bitbucket-repositories-directories.getfileordirectorycontents with: format: rest.format q: rest.q sort: rest.sort max_depth: rest.max_depth outputParameters: - type: object mapping: $. - type: mcp namespace: bitbucket-repositories-directories-mcp port: 9090 transport: http description: MCP adapter for Atlassian Bit Bucket Repositories API — Directories. One tool per consumed operation, routed inline through this capability's consumes block. tools: - 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-directories.gettherootdirectoryofthemainbranch with: format: tools.format outputParameters: - type: object mapping: $. - name: atlassian-get-file-directory-contents description: Atlassian Get File or Directory Contents hints: readOnly: true destructive: false idempotent: true call: bitbucket-repositories-directories.getfileordirectorycontents with: format: tools.format q: tools.q sort: tools.sort max_depth: tools.max_depth outputParameters: - type: object mapping: $.