Skip to main content
Glama

branch.merge

Destructive

Three-way merge of branch head into its parent base using the recorded fork base. Without apply this is a dry run returning the plan and conflicts; with apply a clean plan is applied. Conflicting plans need a forced merge from the console. POST /v1/organizations/{id}/projects/{project}/branches/merge.

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": {
      "organization_id": "<organization_id>",
      "project_id": "<project_id>",
      "base": "<base>",
      "head": "<head>",
      "confirm": "<confirm>"
    },
    "name": "branch.merge"
  }
}

Input Schema

NameRequiredDescriptionDefault
baseYesbase (required)
headYeshead (required)
applyNoApply a clean plan instead of a dry run (default false)
confirmYesMust be true to apply this mutation; otherwise the tool returns the request it would send for approval.
project_idYesproject_id (required)
organization_idYesorganization_id (required)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already flag destructiveHint=true and readOnlyHint=false, and the description adds genuinely new behavior: the default is a non-mutating dry run that returns the plan and conflicts, and authorization/approval flows are handled by the `confirm` mechanism. It omits the irreversibility of an applied merge and any statement about what state remains after a partially applied plan.

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?

Three short sentences, with the core operation front-loaded and the dry-run default stated before the exception case. The trailing POST route is of limited value to an agent caller and is the one element that does not clearly earn its place.

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?

For a six-parameter destructive mutation with no output schema, the description covers mode semantics, the conflict dead-end, and the shape of the dry-run result (plan and conflicts). Missing is an explicit warning about the consequences of `apply` and the relationship to the duplicate `branches.merge` sibling.

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, but the description goes further by defining the relationship between `base` and `head` (parent vs. branch being merged) and by explaining `apply` as the switch between planning and executing. It does not mention `confirm`, though the schema already documents it thoroughly.

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?

The description names a specific operation (three-way merge) on a specific resource pair (`head` into `base`) using the recorded fork base, which is far more informative than the tool name alone. It does not distinguish itself from the near-identical sibling `branches.merge` in the sibling list, leaving a real disambiguation gap.

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?

It clearly states the two modes (dry run by default vs. `apply`) and the exclusion that conflicting plans cannot be resolved here and require a forced merge from the console. It stops short of pointing to related siblings such as `branch.diff` for inspection or explaining which of the two merge tools to choose.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources