Skip to main content
Glama

is_ancestor

Determine if one commit is an ancestor of another to verify whether a fix or feature branch is contained in another branch without cloning. Returns a boolean and explanation.

Instructions

Determines whether commit 'ancestor' is an ancestor of commit 'descendant'. Use to verify whether a fix or feature branch is already contained within another branch without cloning. Returns a boolean and explanation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repoYesRepository name.
ownerYesRepository owner (organization or user).
ancestorYesCandidate ancestor commit SHA, branch, or tag.
descendantYesCandidate descendant commit SHA, branch, or tag.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/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 burden. It usefully discloses the return shape (boolean plus explanation) and that no clone is needed, but says nothing about authentication requirements, rate limits, or error behavior for unresolvable refs.

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 in a logical order: what it computes, when to use it, what it returns. No filler or redundancy.

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 four-parameter read tool with no annotations and no output schema, the description covers purpose, a usage scenario, and the return value. Minor gaps remain around failure modes and how branch/tag names are resolved, but nothing essential to calling it is missing.

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 description coverage is 100%, so owner, repo, ancestor, and descendant are already documented, including that refs may be SHAs, branches, or tags. The description adds no semantics beyond that, so the baseline 3 applies.

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 states a precise verb and resource: it determines ancestry between two named commits, and even clarifies that 'ancestor' and 'descendant' are the two inputs. It does not differentiate from the closest sibling, find_merge_base, which answers a related graph question.

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 gives a concrete use case — verifying whether a fix or feature branch is contained in another branch without cloning — which tells the agent when this tool is appropriate. It offers no explicit exclusions or alternatives, so the agent must infer how it differs from find_merge_base or resolve_ref.

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