Skip to main content
Glama

github_merge_pull_request

Destructive

Squash-merge a GitHub pull request only after a human approves the exact merge, atomically consuming the approval to ensure no other action uses it.

Instructions

Squash-merge a GitHub pull request only after a human approved this exact merge for the same maintenance run. Do not call for pull-request review runs or without the matching approval ID and version. The approval is atomically consumed before the external merge, so it cannot authorize another action.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
runIdYesMaintenance run UUID that owns the approved action.
approvalIdYesApproved and unconsumed RepoPilot approval UUID for merge_pull_request.
pullNumberYesPositive pull request number approved for merge.
repositoryYesGitHub repository in owner/name format; it must be present in GITHUB_ALLOWED_REPOSITORIES.
commitTitleNoOptional squash commit title; omit to use GitHub's default.
approvalVersionYesExact optimistic-lock version of the approved action.
Behavior4/5

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

Annotations already indicate destructiveHint=true and readOnlyHint=false, and the description adds valuable context beyond this: the approval is atomically consumed before the external merge, meaning it cannot authorize another action. This is a critical behavioral trait that an agent must know. However, the description could have elaborated on what happens if the merge fails (e.g., whether the approval is still consumed), leaving a minor gap.

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?

The description is two sentences with zero waste. It front-loads the most critical constraint (merge only after human approval) and then explains the consumption behavior. Every sentence contributes to safe and correct usage.

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 destructive tool with 6 parameters and no output schema, the description captures the essential preconditions (approval, run binding, not for review runs) and the atomic consumption. It does not describe the return value, but since no output schema exists, this is less critical. The sibling tool context (e.g., github_create_pull_request) clarifies the action's scope, and the description is sufficiently complete for an agent to invoke it correctly.

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

Parameters4/5

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

Schema description coverage is 100%, so the schema already documents each parameter's purpose. The description adds semantic value by emphasizing that approvalId and approvalVersion must correspond to a single human approval and that they are consumed, which reinforces the optimistic-lock semantics. This goes slightly beyond the schema descriptions but is not a full replacement for them.

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 clearly states the verb 'squash-merge' and the resource 'GitHub pull request', and specifies the critical precondition of human approval for the same maintenance run. It also differentiates from sibling tools like github_create_pull_request and github_get_pull_request by focusing on the merge action and its approval requirement.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly states when to use the tool ('only after a human approved this exact merge for the same maintenance run') and when not to ('Do not call for pull-request review runs or without the matching approval ID and version'). This provides clear, actionable guidance that distinguishes this tool from alternatives.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/wellkilo/RepoPilot'

If you have feedback or need assistance with the MCP directory API, please join our Discord server