search_code
Search code across Bitbucket repositories using queries, with optional scope by project or repository slug and result limit.
Instructions
Search for code across repositories using Bitbucket Server's code search.
Requires the Bitbucket Server instance to have code search enabled (Elasticsearch).
Args: query: Search query string. project_key: Optional project key to restrict search scope. repo_slug: Optional repository slug to restrict search (requires project_key). limit: Maximum number of results (default 25, max 1000).
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": "search_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | ||
| project_key | No | ||
| repo_slug | No | ||
| limit | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |