Skip to main content
Glama
N0moreher0
by N0moreher0

Merge pull request

project_pr_merge
DestructiveIdempotent

Merge a pull request using merge, squash, or rebase and optionally delete the head branch, refusing closed or conflicting PRs.

Instructions

Merge a pull request (merge/squash/rebase) and optionally delete the head branch. Refuses cleanly when the PR is closed or conflicting. Use when: CI is green and the user asked to land the PR. Use method=squash for a single commit. Avoid when: checks are still running (project_ci_status first), or the user only wants a review comment. Speed: 2-3 API calls (state check, merge, optional branch delete). Output: pr_merge: repo, provider, pr, merged, method, sha, head, base, branch_deleted, note?. Batch-safe: no

Input Schema

NameRequiredDescriptionDefault
prYesPR number or PR URL.
repoNoRepository as "owner/name" or a PR URL (default: VENIRA_GIT_REPO, git.repo in venira.config.json, else the workspace .git origin remote).
methodNoMerge strategy (default: merge).
reasonNoWhy this change is made (e.g. "sua loi null pointer o dong 45"). Recorded in the audit trail so later sessions know the intent. Single line, max 400 chars, secrets are redacted.
providerNoProvider override for this call (default: VENIRA_GIT_PROVIDER, then venira.config.json, then inferred from the origin remote).
commit_titleNoTitle for the merge commit (squash/merge).
delete_branchNoDelete the head branch after a successful merge (same-repo branches only).
commit_messageNoBody for the merge commit.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.5.4

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, idempotentHint=true, readOnlyHint=false, and openWorldHint=true, so the safety profile is covered. The description adds genuine context beyond that: it refuses cleanly when the PR is closed or conflicting, costs 2-3 API calls, is not batch-safe, and lists the output fields. It does not, however, spell out permission/auth requirements for the merge itself.

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 compact and front-loaded: purpose first, then labeled Use/Avoid/Speed/Output/Batch-safe lines. Every line carries selection-relevant information with no filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 8-param mutation tool with no output schema, the description supplies the output field list, failure behavior (refusal on closed/conflicting PRs), cost estimate, and routing to project_ci_status. Nothing an agent needs to invoke it correctly is missing.

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 coverage is 100%, so baseline is 3, and the description adds some value by calling out method=squash for a single commit and that delete_branch only applies to same-repo branches. It does not elaborate on repo/provider resolution or commit_title/commit_message, which stay schema-only.

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 (merge) plus the resource (pull request) and enumerates the three strategies plus the optional branch deletion. It is immediately distinguishable from siblings like project_pr_close, project_pr_comment, and project_pr_create.

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?

Has explicit 'Use when' (CI green, user asked to land the PR) and 'Avoid when' (checks still running — do project_ci_status first; user only wants a review comment) clauses that name the alternative tool. It also recommends method=squash for a single commit, giving concrete selection guidance.

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