Skip to main content
Glama

resolve_ref

Resolve a git branch, tag, or partial SHA into its full 40-character commit SHA before running queries that need the canonical, immutable commit identifier.

Instructions

Resolves a git reference (branch name, tag, or partial SHA) to a full 40-character commit SHA. Use before queries when you need the canonical immutable commit identifier. Returns {sha, refType}. Fast and cached.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
refYesBranch name, tag name, or commit SHA to resolve.
repoYesRepository name.
ownerYesRepository owner (organization or user).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It does disclose useful traits: the return shape ({sha, refType}) and the 'fast and cached' performance profile. However, it says nothing about failure modes (invalid/ambiguous ref), required permissions for private repos, or cache staleness, leaving meaningful behavioral gaps for an annotation-free tool.

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, front-loaded with the core operation, followed by usage and return shape. Every sentence earns its place with no padding.

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?

Though no output schema exists, the description compensates by declaring the returned fields. Combined with the parameter schema being fully documented, an agent has enough to invoke it correctly; only error/permission behavior is unaddressed.

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%, and each of the three parameters (owner, repo, ref) is already documented in the schema with the same wording the description implies. The description adds only the accepted ref formats (branch/tag/partial SHA), which is marginal beyond the schema baseline of 3.

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 (resolve) and resource (git reference) along with the exact transformation performed: branch/tag/partial SHA to full 40-character commit SHA. The output is also defined, so an agent can distinguish it from siblings like get_file_at_ref or find_merge_base without opening a 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?

Explicitly says to use it 'before queries when you need the canonical immutable commit identifier', which gives a clear triggering context. It does not name alternative tools or state when-not to use it, so it falls short of a 5.

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