Skip to main content
Glama
saidsef

GitHub PR Issue Analyser

by saidsef

Github Merge Pr

github_merge_pr

Merge a specific pull request using merge, squash, or rebase, optionally requiring the expected head SHA so GitHub rejects the merge if a newer push arrived after your read.

Instructions

Merges a specific pull request. Read head_sha from github_get_pr_content and pass it as expected_head_sha, and GitHub refuses with a 409 rather than merge a push that arrived after the read. See #517.

Workflow and conventions: github_get_skill('pr-management').

Input Schema

NameRequiredDescriptionDefault
pr_numberYes
repo_nameYes
repo_ownerYes
commit_titleNo
merge_methodNosquash
commit_messageNo
expected_head_shaNoRefuse unless the head still matches this SHA, as github_get_pr_content reports it

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv54.0.0
    • addedInput schema / properties / expected_head_sha
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Refuse unless the head still matches this SHA, as github_get_pr_content reports it"
      +}
  2. Addedv42.0.0

TDQS

A4/5.0
Behavior4/5

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

The annotations already declare readOnlyHint=false and idempotentHint=false, but the description adds genuinely new behavioral context: a stale expected_head_sha causes a 409 refusal rather than a silent merge of newer pushes. This race-condition guard is exactly the kind of context annotations cannot convey. It does not cover permission requirements or irreversibility of the merge.

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?

The core behavior and the 409 rationale are front-loaded in the first two sentences, and the skill pointer is compact. 'See #517' is minor noise but is arguably evidence for why the guard exists, and no sentence is redundant.

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?

An output schema exists, so return values need not be explained, and the reference to github_get_skill('pr-management') offloads workflow conventions. The main residual gap is merge_method semantics and permission expectations, but for a merge tool the description covers the high-stakes details an agent needs.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is only 14% (just expected_head_sha), so the description must compensate for six largely undocumented parameters. It does add real meaning for the one critical parameter by telling the agent where to source the SHA, but merge_method (including its squash default), commit_title, and commit_message are left entirely to the enum names and defaults.

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?

The description opens with a specific verb and resource ('Merges a specific pull request') that is unambiguous and distinct from every sibling, including github_create_pr, github_update_pr, and github_get_pr_content. An agent can identify the operation 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?

It states a concrete prerequisite workflow: read head_sha from github_get_pr_content and pass it as expected_head_sha. It also routes to github_get_skill('pr-management') for broader conventions. What is missing is any explicit statement of when not to merge (e.g., draft PRs, failing checks, merge conflicts).

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