Skip to main content
Glama
nbhson

Bitbucket MCP Server

by nbhson

grep

Search file contents in a Bitbucket repository using regex patterns. Control output with modes for content, file paths, or match counts.

Instructions

Regex search file contents across a repository, like ripgrep on a local clone. Supports content/files/count modes, filename glob, path filtering, context lines, and case-insensitive search. One archive download per repo+commit, streamed in constant memory, cached in-process.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
refNoBranch, tag, or commit SHA to search (default: default branch)
globNoFilename glob filter (e.g., '*.ts', '*.java', 'src/**')
modeNoSearch mode: 'content' (matching lines with optional context), 'files' (list matching file paths), 'count' (match count per file)
pathNoDirectory path prefix to limit search scope (e.g., 'src/main')
queryYesRegex pattern to search for in file contents
repoSlugYesThe repository slug
projectKeyYesThe project key (e.g., PROJ)
max_resultsNoMaximum number of results to return (default: 200)
context_linesNoNumber of context lines before/after each match in content mode (default: 0)
case_insensitiveNoCase-insensitive search (default: false)
Behavior4/5

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

With no annotations provided, the description takes full responsibility. It reveals important behavioral traits: single archive download per repo+commit, streaming in constant memory, and in-process caching. This gives agents insight into resource usage and performance, though rate limits or authentication needs are not mentioned.

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

Conciseness5/5

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

The description is extremely concise: two sentences that front-load the purpose and then detail capabilities. Every sentence adds value without redundancy. Perfectly sized for quick agent consumption.

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

Completeness4/5

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

Despite no output schema, the description covers the tool's core functionality and implementation details adequately for a search tool. It mentions all key features but omits result limiting details (default max_results) and output format per mode, which are partly in schema. Overall, it provides sufficient context for an agent to use the tool correctly.

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

Parameters3/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. The description reinforces the schema by mentioning modes and filters but does not add new semantics beyond what the schema already documents. For example, 'max_results' and 'context_lines' defaults are not noted in the description.

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

Purpose5/5

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

The description clearly states the tool performs regex search on file contents within a repository, using a ripgrep analogy. It explicitly lists supported modes (content/files/count) and features (glob, path filtering, context lines, case-insensitive), making the purpose distinct from sibling tools like 'get_file_content' or 'search_code'.

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?

The description implies usage for regex-based file content searches but does not provide explicit guidance on when to use this tool versus the sibling tool 'search_code', which could be confused. No 'when-not' or alternative suggestions are given, leaving the agent to infer context.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/nbhson/bitbucket-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server