Search code
bb_search_codeSearch Bitbucket repository code with full-text queries and narrow results by project, repository, path, or file extension; Cloud searches require a workspace and support repository filtering.
Instructions
Full-text code search. On Server/DC supports Lucene modifiers: project:, repo:/, path:, ext:. On Cloud the search is workspace-scoped: 'project' selects the workspace (required), 'repo' narrows to one repository ('/'), path/ext modifiers are not supported.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"query": "<query>"
},
"name": "bb_search_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ext | No | Modifier: limit search to this file extension (Server/DC only), e.g. 'ts'. | |
| page | No | One-based page number (Cloud only). | |
| path | No | Modifier: limit search to paths starting with this prefix (Server/DC only). | |
| repo | No | Modifier: limit search to this repository as '<projectKey>/<slug>'. | |
| limit | No | Page size (max 200 for search). | |
| query | Yes | Free-text search expression, e.g. 'OptimisticLock' or 'class RestClient'. | |
| start | No | Zero-based page offset (Server/DC). | |
| project | No | Modifier: limit search to this project key (on Cloud: the workspace slug — required). |