Bitbucket Pipelines · Capability
Bitbucket API — Search
Bitbucket API — Search. 3 operations. Lead operation: Search for code in a team's repositories. Self-contained Naftiko capability covering one Bitbucket Pipelines business surface.
What You Can Do
GET
Searchteam
— Search for code in a team's repositories
/v1/teams/{username}/search/code
GET
Searchaccount
— Search for code in a user's repositories
/v1/users/{selected-user}/search/code
GET
Searchworkspace
— Search for code in a workspace
/v1/workspaces/{workspace}/search/code
MCP Tools
search-code-team-s-repositories
Search for code in a team's repositories
read-only
idempotent
search-code-user-s-repositories
Search for code in a user's repositories
read-only
idempotent
search-code-workspace
Search for code in a workspace
read-only
idempotent
Capability Spec
naftiko: 1.0.0-alpha2
info:
label: Bitbucket API — Search
description: 'Bitbucket API — Search. 3 operations. Lead operation: Search for code in a team''s repositories. Self-contained
Naftiko capability covering one Bitbucket Pipelines business surface.'
tags:
- Bitbucket Pipelines
- Search
created: '2026-05-19'
modified: '2026-05-19'
binds:
- namespace: env
keys:
BITBUCKET_PIPELINES_API_KEY: BITBUCKET_PIPELINES_API_KEY
capability:
consumes:
- type: http
namespace: bitbucket-pipelines-search
baseUri: https://api.bitbucket.org/2.0
description: Bitbucket API — Search business capability. Self-contained, no shared references.
resources:
- name: teams-username-search-code
path: /teams/{username}/search/code
operations:
- name: searchteam
method: GET
description: Search for code in a team's repositories
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: username
in: path
type: string
description: The account to search in; either the username or the UUID in curly braces
required: true
- name: search_query
in: query
type: string
description: The search query
required: true
- name: page
in: query
type: integer
description: Which page of the search results to retrieve
- name: pagelen
in: query
type: integer
description: How many search results to retrieve per page
- name: users-selected_user-search-code
path: /users/{selected_user}/search/code
operations:
- name: searchaccount
method: GET
description: Search for code in a user's repositories
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: selected_user
in: path
type: string
description: Either the UUID of the account surrounded by curly-braces, for example `{account UUID}`, OR an Atlassian
Account ID.
required: true
- name: search_query
in: query
type: string
description: The search query
required: true
- name: page
in: query
type: integer
description: Which page of the search results to retrieve
- name: pagelen
in: query
type: integer
description: How many search results to retrieve per page
- name: workspaces-workspace-search-code
path: /workspaces/{workspace}/search/code
operations:
- name: searchworkspace
method: GET
description: Search for code in a workspace
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: workspace
in: path
type: string
description: The workspace to search in; either the slug or the UUID in curly braces
required: true
- name: search_query
in: query
type: string
description: The search query
required: true
- name: page
in: query
type: integer
description: Which page of the search results to retrieve
- name: pagelen
in: query
type: integer
description: How many search results to retrieve per page
exposes:
- type: rest
namespace: bitbucket-pipelines-search-rest
port: 8080
description: REST adapter for Bitbucket API — Search. One Spectral-compliant resource per consumed operation, prefixed
with /v1.
resources:
- path: /v1/teams/{username}/search/code
name: teams-username-search-code
description: REST surface for teams-username-search-code.
operations:
- method: GET
name: searchteam
description: Search for code in a team's repositories
call: bitbucket-pipelines-search.searchteam
with:
username: rest.username
search_query: rest.search_query
page: rest.page
pagelen: rest.pagelen
outputParameters:
- type: object
mapping: $.
- path: /v1/users/{selected-user}/search/code
name: users-selected-user-search-code
description: REST surface for users-selected_user-search-code.
operations:
- method: GET
name: searchaccount
description: Search for code in a user's repositories
call: bitbucket-pipelines-search.searchaccount
with:
selected_user: rest.selected_user
search_query: rest.search_query
page: rest.page
pagelen: rest.pagelen
outputParameters:
- type: object
mapping: $.
- path: /v1/workspaces/{workspace}/search/code
name: workspaces-workspace-search-code
description: REST surface for workspaces-workspace-search-code.
operations:
- method: GET
name: searchworkspace
description: Search for code in a workspace
call: bitbucket-pipelines-search.searchworkspace
with:
workspace: rest.workspace
search_query: rest.search_query
page: rest.page
pagelen: rest.pagelen
outputParameters:
- type: object
mapping: $.
- type: mcp
namespace: bitbucket-pipelines-search-mcp
port: 9090
transport: http
description: MCP adapter for Bitbucket API — Search. One tool per consumed operation, routed inline through this capability's
consumes block.
tools:
- name: search-code-team-s-repositories
description: Search for code in a team's repositories
hints:
readOnly: true
destructive: false
idempotent: true
call: bitbucket-pipelines-search.searchteam
with:
username: tools.username
search_query: tools.search_query
page: tools.page
pagelen: tools.pagelen
outputParameters:
- type: object
mapping: $.
- name: search-code-user-s-repositories
description: Search for code in a user's repositories
hints:
readOnly: true
destructive: false
idempotent: true
call: bitbucket-pipelines-search.searchaccount
with:
selected_user: tools.selected_user
search_query: tools.search_query
page: tools.page
pagelen: tools.pagelen
outputParameters:
- type: object
mapping: $.
- name: search-code-workspace
description: Search for code in a workspace
hints:
readOnly: true
destructive: false
idempotent: true
call: bitbucket-pipelines-search.searchworkspace
with:
workspace: tools.workspace
search_query: tools.search_query
page: tools.page
pagelen: tools.pagelen
outputParameters:
- type: object
mapping: $.