search
Search for code patterns or files across Bitbucket Server repositories. Find specific content by querying file names and contents, with filtering by project or repository.
Instructions
Search for code or files across repositories. Use this to find specific code patterns, file names, or content within projects and repositories. Searches both file contents and filenames. Supports filtering by project, repository, and query optimization.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Search query string to look for in code or file names. | |
| project | No | Bitbucket project key to limit search scope. If omitted, searches across accessible projects. | |
| repository | No | Repository slug to limit search to a specific repository within the project. | |
| type | No | Query optimization: "file" wraps query in quotes for exact filename matching, "code" uses default search behavior. Both search file contents and filenames. | |
| limit | No | Number of results to return (default: 25, max: 100) | |
| start | No | Start index for pagination (default: 0) |