Skip to main content
Glama

merge_pr

Merge a pull request after verifying its mergeable status, with options for merge method, custom commit text, and automatic branch deletion.

Instructions

Merge a PR after checking mergeable status.

Options:

  • merge_method: "squash" (default), "merge", or "rebase"

  • commit_title/commit_message: custom merge commit text (squash/merge only)

  • delete_branch: delete head branch after merge (default: True)

Returns: {merged, sha, message, branch_deleted}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pr_numberYes
merge_methodNosquash
commit_titleNo
commit_messageNo
delete_branchNo
ownerNo
repoNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior3/5

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

No annotations provided, so description bears full burden. It discloses mergeable status check, default delete_branch=true, and method options. However, it omits what happens if mergeable is false (error? no-op?), and lacks details on side effects like PR closure or status updates.

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?

Extremely concise: two sentences plus a bulleted list of options and return format. Every sentence adds value; no redundancy. Front-loaded with core action.

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?

Output shape is provided (merged, sha, etc.), and all parameters described. Lacks prerequisites like user permissions or that PR must be open. For a single-action tool, this is nearly complete but could add a note about required access.

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

Parameters5/5

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

Schema describes only types and defaults (0% coverage), but description adds rich semantics: explains merge_method enum values, commit_title/commit_message applicability (squash/merge only), and delete_branch default. Significantly enhances parameter understanding beyond schema.

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 'Merge' and the resource 'PR', and adds specificity with 'after checking mergeable status'. This distinguishes it from sibling tools like 'update_pr' or 'create_pr_with_content'.

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

Usage Guidelines3/5

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

The description lists options and defaults but does not explicitly guide when to use this tool versus alternatives like 'update_pr' or 'check_ci_status'. Usage context is implied but lacks explicit 'when to use' or 'when not to use' guidance.

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/rriesco/github-mcp-server'

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