Skip to main content
Glama
zhanglc

Bitbucket MCP Server

by zhanglc

add_comment

Add comments to Bitbucket pull requests, including general feedback, threaded replies, inline line comments, and code suggestions for precise code review.

Instructions

Add a comment to a pull request. Supports: 1) General PR comments, 2) Replies to existing comments, 3) Inline comments on specific code lines (using line_number OR code_snippet), 4) Code suggestions for single or multi-line replacements. For inline comments, you can either provide exact line_number or use code_snippet to auto-detect the line.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathNoFile path for inline comment. Required for inline comments. Example: "src/components/Button.js" (optional)
line_typeNoType of line: ADDED (green/new lines), REMOVED (red/deleted lines), or CONTEXT (unchanged lines). Default: CONTEXT
workspaceYesBitbucket workspace/project key (e.g., "PROJ")
repositoryYesRepository slug (e.g., "my-repo")
suggestionNoReplacement code for a suggestion. Creates a suggestion block that can be applied in Bitbucket UI. Requires file_path and line_number. For multi-line, include newlines in the string (optional)
line_numberNoExact line number in the file. Use this OR code_snippet, not both. Required with file_path unless using code_snippet (optional)
code_snippetNoExact code text from the diff to find and comment on. Use this instead of line_number for auto-detection. Must match exactly including whitespace (optional)
comment_textYesThe main comment text. For suggestions, this is the explanation before the code suggestion.
match_strategyNoHow to handle multiple matches when using code_snippet. "strict": fail with detailed error showing all matches. "best": automatically pick the highest confidence match. Default: "strict"
search_contextNoAdditional context lines to help locate the exact position when using code_snippet. Useful when the same code appears multiple times (optional)
pull_request_idYesPull request ID
parent_comment_idNoID of comment to reply to. Use this to create threaded conversations (optional)
suggestion_end_lineNoFor multi-line suggestions: the last line number to replace. If not provided, only replaces the single line at line_number (optional)
Behavior4/5

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

No annotations are provided, so the description carries the burden of behavioral disclosure. It adds meaningful context by explaining supported comment types, the auto-detection behavior of code_snippet, and the distinction between single and multi-line suggestions. This goes beyond a simple 'add comment' statement, though it does not mention side effects or error handling (e.g., strict match failures), which are partially covered in the schema.

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 concise, front-loaded with the primary purpose, and uses a numbered list to structure four distinct capabilities. Every sentence adds value without redundancy, making it easy to parse quickly.

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?

Given the tool's complexity (13 params, nested objects, no output schema), the description covers the main functionality and usage patterns well. It lacks explicit guidance on some edge cases or return values, but the schema compensates. The description is complete enough for an agent to select and invoke the tool correctly in most scenarios.

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?

The schema already provides 100% coverage with detailed descriptions for all 13 parameters, including relationships like 'Use this OR code_snippet, not both.' The description adds a high-level synthesis of modes but does not provide additional parameter-level semantics beyond what the schema states. Baseline 3 is appropriate.

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 verb+resource ('Add a comment to a pull request') and enumerates four distinct modes: general comments, replies, inline comments, and code suggestions. This differentiates it from sibling tools like approve_pull_request or request_changes, making its purpose unambiguous.

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

Usage Guidelines4/5

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

The description explains when to use the tool (for adding comments) and provides guidance on selecting modes (e.g., line_number vs code_snippet). It does not explicitly contrast with alternatives, but the four-mode breakdown gives clear context for choosing among tool features. No exclusions are stated, but the tool's scope is evident.

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/zhanglc/bitbucket-mcp-server'

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