Skip to main content
Glama

find_pr_for_commit

Look up merged pull requests for any commit SHA to uncover original PR discussions, reviews, and context. Returns PR number, title, URL, merged date, author.

Instructions

Finds merged pull requests associated with a commit SHA. Use to discover original PR discussions, reviews, and context for an existing commit. Returns PR number, title, URL, merged date, and author.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
shaYesCommit SHA, branch, or tag to look up.
repoYesRepository name.
ownerYesRepository owner (organization or user).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations the description carries the full burden, and it does real work: it discloses that only *merged* PRs are returned and enumerates the return contract (number, title, URL, merged date, author). It does not mention auth requirements, rate limits, or what happens for a SHA with no associated PR.

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 action and scope, then usage, then return shape. No filler or restatement of the name.

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?

No output schema exists, but the description compensates by listing the returned fields, and the merged-only filter is stated. Missing only edge-case behavior (empty result, invalid SHA handling) for a fully complete picture.

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/sha are already documented at the field level; the description only implies that the SHA may be a commit, and the schema actually broadens it to 'branch, or tag'. Baseline 3 for high-coverage schemas is correct with no added syntax or format guidance.

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?

Specific verb+resource+scope: 'Finds merged pull requests associated with a commit SHA.' The merged-only constraint and the SHA linkage make it instantly distinguishable from the plumbing siblings (find_merge_base, resolve_ref, get_blame).

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?

'Use to discover original PR discussions, reviews, and context for an existing commit' gives a clear motivating scenario for when to reach for this tool. It stops short of naming alternatives or stating exclusions, which the very different sibling set makes less necessary.

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