Skip to main content
Glama

Merge fix PR

merge_fix
DestructiveIdempotent

Squash-merge a fix PR into the default branch, mark the linked bug report as fixed, and notify the reporter. Re-readies draft PRs before merging.

Instructions

Squash-merge the GitHub PR for a fix attempt, mark the linked report fixed, and notify the reporter. Re-readies the PR first if it is still a draft. Returns { merged, reportStatus }. Write; destructive and irreversible from Mushi's side — once GitHub merges into the target repo's default branch there is no unmerge endpoint, only a manual revert PR outside this tool. Idempotent — re-running an already-merged attempt is a safe no-op. Prerequisite: CI green (check with refresh_ci); confirm the diff and CI status with the user before calling on a PR you have not reviewed. Use to ship a fix opened by dispatch_fix; use transition_status to change state without merging.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fixIdYesFix attempt UUID whose GitHub PR should be squash-merged (`fix_id` is accepted too.)
mergeMethodNoGitHub merge method (default squash)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
shaNoMerge commit SHA, when GitHub reported one
mergedNoTrue when GitHub accepted the merge in this call
reportIdYesReport UUID linked to this fix attempt
justMergedNoTrue when this call performed the merge
reportStatusYesReport workflow status after merge bookkeeping
alreadyMergedNoTrue when the PR was already merged (idempotent no-op)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.1.12
    • changedInput schema / properties / fixId / description
      Previous value: -"Fix attempt UUID whose GitHub PR should be squash-merged"New value: +"Fix attempt UUID whose GitHub PR should be squash-merged (`fix_id` is accepted too.)"
    • addedOutput schema / properties / justMerged
      Added value: +{
      +  "description": "True when this call performed the merge",
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / sha
      Added value: +{
      +  "description": "Merge commit SHA, when GitHub reported one",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
  2. Changed2 schema fields changedv0.1.10
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  3. Changed3 schema fields changedv0.1.2
    • changedInput schema / properties / fixId / description
      Previous value: -"Fix attempt UUID"New value: +"Fix attempt UUID whose GitHub PR should be squash-merged"
    • changedInput schema / properties / mergeMethod / description
      Previous value: -"GitHub merge method"New value: +"GitHub merge method (default squash)"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "alreadyMerged": {
      +      "description": "True when the PR was already merged (idempotent no-op)",
      +      "type": "boolean"
      +    },
      +    "merged": {
      +      "description": "True when GitHub accepted the merge in this call",
      +      "type": "boolean"
      +    },
      +    "reportId": {
      +      "description": "Report UUID linked to this fix attempt",
      +      "type": "string"
      +    },
      +    "reportStatus": {
      +      "description": "Report workflow status after merge bookkeeping",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "reportId",
      +    "reportStatus"
      +  ],
      +  "type": "object"
      +}
  4. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already say destructiveHint=true and idempotentHint=true, but the description goes further by explaining that the action is irreversible from Mushi's side, that GitHub has no unmerge endpoint, that a revert would require a manual PR, and that re-running on an already-merged attempt is a safe no-op. This substantially enriches the annotation signal.

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 dense but every sentence earns its place: outcome, return shape, destructiveness, idempotence, prerequisite, and sibling routing. It is front-loaded with the core action and return value before safety context, and no filler or redundant restatement appears.

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?

With an output schema present, annotations covering safety, and a description covering irreversibility, idempotence, prerequisites, and alternatives, an agent has everything needed to decide whether and when to call this tool. Nothing material is missing for correct invocation.

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

Parameters3/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 fully documents fixId and mergeMethod, including the accepted alias fix_id and the default merge method. The description adds little parameter-level detail beyond aligning with the squash default, which is acceptable given the high schema coverage.

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: squash-merge the GitHub PR for a fix attempt, then mark the report fixed and notify the reporter. It also names sibling tools dispatch_fix and transition_status, so an agent can distinguish shipping a fix from dispatching one or changing status without merging.

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?

It gives explicit when-to-use guidance: 'Use to ship a fix opened by dispatch_fix.' It also states the alternative ('use transition_status to change state without merging') and a hard prerequisite: CI must be green, checked via refresh_ci, and the agent must confirm the diff and CI status with the user before merging an unreviewed PR.

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