Skip to main content
Glama

pr_merge

Validate approval and confidence criteria before merging a PR; fail-closed and require human confirmation when criteria are unmet.

Instructions

合并 PR——merge_criteria 真判定(approver-review:reviewer 非 submitter;confidence-min:confirmed=1.0/suggested=0.5/无=0 ≥ detail 阈值;未知 kind 或 detail 畸形判不过)fail-closed,未过挂起 HITL(human_confirmed=true 强制合并)。PR 的 workflow 存在 branch-{submitter} 时联动写回 trunk(version+1+删 branch,mergedVersion 回填;写回失败 PR 回退 open)。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actorYes操作者
pr_idYesPR 标识
data_dirNo数据根目录
human_confirmedNoHITL 人审确认(criteria 未过时须显式 true 才合并)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden and delivers: fail-closed behavior on unknown kind/malformed detail, HITL suspension when criteria are not met, forced merge via human_confirmed, and side effects including workflow writeback (version+1, branch deletion, mergedVersion backfill) and PR rollback to open on writeback failure. This is rich, concrete behavioral disclosure.

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 description is a single dense sentence, information-rich with no wasted words, and it front-loads the core action and criteria. The heavy use of parentheses and semicolons makes it slightly harder to parse, but every clause earns its place.

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?

Given 4 parameters, no output schema, and no annotations, the description covers purpose, criteria, HITL behavior, and side effects thoroughly. It does not specify the return value or success response, which would be useful without an output schema, but the state transitions it describes are sufficient for correct invocation.

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 the baseline is 3. The description adds meaningful value by explaining the human_confirmed parameter's role in the HITL flow ('human_confirmed=true 强制合并') and tying it to the fail-closed criteria. It does not elaborate on pr_id or actor, but the schema already documents those.

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 begins with the explicit verb+resource '合并 PR' (merge PR), immediately identifying the operation. It then details the merge_criteria logic, distinguishing this from siblings like pr_submit and pr_review by explaining exactly what conditions determine a merge.

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?

The description outlines when the merge succeeds, when it fails closed, and when human confirmation is required ('未过挂起 HITL(human_confirmed=true 强制合并)'). This effectively instructs the agent on setting human_confirmed. It does not explicitly contrast with alternatives like pr_review, but the behavioral conditions provide usable guidance.

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

Deploy Server

Other Tools