Skip to main content
Glama
Bitbucket DC MCP Server

Bitbucket DC MCP Server

by lvluu

editFile

Create or update a file by committing content to a branch in a Bitbucket Data Center repository; use sourceCommitId when updating an existing file.

Instructions

Create or update a file (commits it)

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": {
      "repoSlug": "<repoSlug>",
      "path": "<path>",
      "content": "<content>",
      "message": "<message>",
      "branch": "<branch>"
    },
    "name": "editFile"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes
branchYesBranch to commit to
contentYesNew file content
messageYes
repoSlugYes
projectKeyNo
sourceCommitIdNoRequired to update an existing file

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.10.0

TDQS

C2.6/5.0
Behavior2/5

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

With no annotations, the description carries the full burden and only discloses that the edit is committed. It omits whether an existing file is overwritten or rejected without sourceCommitId, whether the branch must already exist, permission/authorization requirements, and whether the commit is atomic or creates intermediate state.

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

Conciseness3/5

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

One short, front-loaded sentence with no filler, which is good structurally, but the brevity is achieved by omission rather than economy — the parenthetical is the only detail and the rest of the behavior is left unstated.

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

Completeness2/5

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

This is a mutating, 7-parameter tool with no annotations, no output schema, and under-half parameter documentation, so the description should be doing substantial work and does almost none. An agent cannot tell from the definition how failure modes, required preconditions, or the create/update distinction behave.

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

Parameters2/5

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

Schema description coverage is only 43% (branch, content, sourceCommitId documented; path, message, repoSlug, projectKey are not), so the description needed to compensate and adds nothing about any parameter. In particular it never explains the create-vs-update switch that sourceCommitId governs, which is the key ambiguity left to the agent.

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?

"Create or update a file" names a concrete verb pair and resource, and "(commits it)" clarifies the effect on the repo rather than just the working copy. It is reasonably distinguishable from read-only siblings like getFileContent or browseFiles, though it names no 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 Guidelines2/5

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

There is no when-to-use guidance: nothing says when to choose create vs update, when this is preferable to another write path, or what prerequisites exist. The parenthetical hints at commit semantics but not at selection criteria between modes.

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