Skip to main content
Glama
bitbucket-mcp

bitbucket-mcp

by nevzatcirak

Search code

bb_search_code

Search 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

NameRequiredDescriptionDefault
extNoModifier: limit search to this file extension (Server/DC only), e.g. 'ts'.
pageNoOne-based page number (Cloud only).
pathNoModifier: limit search to paths starting with this prefix (Server/DC only).
repoNoModifier: limit search to this repository as '<projectKey>/<slug>'.
limitNoPage size (max 200 for search).
queryYesFree-text search expression, e.g. 'OptimisticLock' or 'class RestClient'.
startNoZero-based page offset (Server/DC).
projectNoModifier: limit search to this project key (on Cloud: the workspace slug — required).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A3.5/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden; it does disclose the key behavioral divergence that Cloud is workspace-scoped and requires 'project' while path/ext modifiers are unsupported there. However it says nothing about what results look like (file paths, match snippets, counts), pagination interaction between 'start' and 'page', or limits, which matter for a search tool with no output schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose is front-loaded in four words, then platform differences are grouped by deployment. Slight redundancy with the schema's modifier syntax and 'Server/DC only' notes, but nothing is wasteful.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Eight parameters, no annotations and no output schema make the description the only source of behavioral context, and it covers the platform branching well. It leaves out result shape and paging behavior (start vs page vs limit), which an agent needs to call this correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, and the description adds real meaning: 'project' is required and acts as the workspace selector on Cloud, while the Lucene modifier syntax is spelled out for Server/DC. It stops short of explaining how 'repo' relates to 'project' beyond format, but that is a minor gap.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ("Full-text code search") with a clear scope. It is distinguishable from file-reading siblings like bb_get_file_content, though it never names an alternative explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied: an agent infers it should call this when it needs to find code by text rather than read a known file. The valuable platform split (Server/DC vs Cloud) is stated, but there is no explicit when-to-use or when-not-to-use guidance against bb_get_file_content or bb_browse_repository.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.