Skip to main content
Glama

get_merge_base

Get the best common ancestor of two Bitbucket branches, tags, or commit hashes to check ancestry by comparing the returned hash with a resolved commit.

Instructions

Get Bitbucket's best common ancestor of two branches, tags or hashes.

Useful for ancestry checks: compare the returned hash with a resolved commit.
Bitbucket returns one best ancestor, even if the graph has several.

Input Schema

NameRequiredDescriptionDefault
baseYes
headYes
repo_slugYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It valuably discloses that Bitbucket returns a single best ancestor even when several exist, but it omits permission requirements, error behavior when no common ancestor exists, and does not explicitly frame this as a safe read operation.

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?

Three short sentences with the core purpose front-loaded and no wasted text. The final sentence adds a non-obvious behavioral nuance and earns 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 simple three-parameter read tool with no output schema, the description covers purpose, usage, and the key return behavior. It could still say more about repo_slug and the no-common-ancestor case, but it is largely complete.

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 0%, so the description must compensate. It does partially by explaining that base/head accept branches, tags, or hashes, but repo_slug is left unexplained and no format details or examples are provided for any parameter.

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?

States a specific verb and resource: returns Bitbucket's best common ancestor of two refs. The concept of a merge-base is distinct from sibling tools like compare_commits or get_commit, so an agent can identify it without opening the schema.

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?

Gives a clear usage scenario ('Useful for ancestry checks: compare the returned hash with a resolved commit') but does not name alternatives or say when not to use it. That is clear context without exclusions, matching a 4.

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