Skip to main content
Glama
Upendrasengar

bitbucket-server-mcp

edit_file

Update a file in a Bitbucket repository by committing new content. Returns commit metadata and supports optimistic locking to prevent conflicts.

Instructions

Edit a file in a repository by committing a new version via the Bitbucket REST API. Returns the commit metadata.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
branchYesTarget branch name.
contentYesFull new file content as a string.
messageYesCommit message.
projectNoProject key. Defaults to BITBUCKET_DEFAULT_PROJECT.
filePathYesPath to the file in the repository.
repositoryYesRepository slug.
sourceBranchNoFork point branch when creating a new branch.
sourceCommitIdNoCurrent commit ID for optimistic locking. If provided and the branch has advanced, the request will fail with a 409 conflict.
Behavior3/5

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

The description states it commits a new version and returns commit metadata, which adds context beyond annotations (readOnlyHint=false, destructiveHint=false). However, it does not disclose that the file content is fully overwritten (replacing existing content) nor explain the optimistic locking behavior hinted by sourceCommitId 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 a single, well-formed sentence that efficiently conveys the action and return value. No extraneous words or redundancy.

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?

Given the moderate complexity (8 parameters, 5 required, no output schema), the description covers the core operation but omits context like default project behavior, sourceBranch usage, and conflict handling. It is functional but not fully comprehensive.

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 parameters are adequately described. The tool description adds no extra semantic meaning beyond the schema; it merely says 'Edit a file' which is already implied by the action.

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 explicitly states the action ('Edit a file'), the resource ('in a repository'), and the mechanism ('by committing a new version via the Bitbucket REST API'), making the purpose clear. The verb 'edit' is unique among sibling tools (no other 'edit' tool), distinguishing it from browsing, getting content, etc.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives like creating a file or managing branches. There is no mention of prerequisites (e.g., branch must exist) or when not to use it (e.g., for renaming or moving files).

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

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