search_code
Search a BitBucket repository for code patterns, function names, or text. Returns matching locations with snippets.
Instructions
Search for code patterns in a BitBucket repository.
Use this tool to find specific code patterns, function names, or text within a repository's codebase.
Args: query: Search query for code content. repository: Repository slug. If not provided, uses current repository context. workspace: Workspace slug. If not provided, uses the default workspace. limit: Maximum number of results to return. Default 20.
Returns: JSON list of matching code locations with snippets.
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 |
|---|---|---|---|
| limit | No | ||
| query | Yes | ||
| workspace | No | ||
| repository | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |