Skip to main content
Glama
mergestorm-mcp

mergestorm-mcp

Official

Adopt PR stack

stack_adopt
Destructive

Adopt an open GitHub PR chain into a Mergestorm stack, configuring auto-land and review, patch, conflict, and CI overrides for stack management.

Instructions

Adopt an open GitHub PR chain into a Mergestorm stack. auto_land is boolean; auto_review, auto_patch, auto_resolve_conflicts, and auto_fix_ci accept true, false, or null, where null clears the override. Omitted auto_land seeds from auto_land_default; omitted overrides are not seeded. Never changes account settings. Adoption needs the Mergestorm Surge GitHub App on the repository. Stacks, the merge queue and Auto land run through that App; Cyclone is the auto-patch App. Without it the API returns cyclone_not_connected or cyclone_not_installed; the message, and error.reason starting with surge_ when Surge is the one to install, say which App is missing — do not retry, tell the human what the message says. Read stack_status with result.stack.id afterward to verify policy and Cyclone ownership. With 2+ PRs, adopt moves the bottom PR's GitHub base to mg-stack- and parks PR3+ on an mg-park-* freeze; a 1-PR stack stays on main. Leave those bases. Never retarget the bottom back to main. Follow watch.next.args until watch.done; background watching requires a confirmed host notification. See server instructions.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "owner": "<owner>",
      "repo": "<repo>",
      "pr_number": "<pr_number>"
    },
    "name": "stack_adopt"
  }
}

Input Schema

NameRequiredDescriptionDefault
repoYes
ownerYes
auto_landNo
pr_numberYes
auto_patchNo
auto_fix_ciNo
auto_reviewNo
auto_resolve_conflictsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.31

TDQS

A4.1/5.0
Behavior5/5

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

Annotations already flag destructive and open-world, and the description goes well beyond them: it names the exact side effect (moving the bottom PR's base to mg-stack-<n>, parking PR3+ on mg-park-*), states what is left untouched (account settings, those bases), and enumerates the App-prerequisite failure modes and their error codes. That is precisely the kind of auth and mutation context the hints cannot convey.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is front-loaded correctly with purpose and parameter semantics, but the remaining text is one dense block that jams App prerequisites, error codes, base-retargeting rules, verification steps and watch-loop instructions together without structure. Every sentence carries information, yet the packing makes the critical "leave those bases" rule easy to miss.

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 an 8-parameter destructive tool with no output schema, the description covers prerequisites, failure handling, side effects, and the follow-up verification call, and it implicitly reveals result.stack.id and watch.next.args. The only real gap is the missing return-shape explanation and the ambiguity of which PR pr_number designates.

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 0%, so the description must carry the load, and it does for the five auto_* parameters: boolean vs true/false/null, null clears the override, omitted auto_land seeds from auto_land_default while omitted overrides are not seeded. owner, repo and pr_number are left unexplained, and it is unclear which PR in a chain pr_number should be, which keeps this below a 5.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

"Adopt an open GitHub PR chain into a Mergestorm stack" gives a specific verb and resource, and the later detail about 2+ PRs vs a 1-PR stack pins down what adoption actually does. It never contrasts itself with siblings such as stack_publish or stack_restack, so an agent must infer the boundary from names alone.

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?

Operational guidance is concrete: adoption requires the Surge GitHub App, do not retry on cyclone_not_connected/cyclone_not_installed, tell the human, then verify with stack_status and follow watch.next.args until watch.done. What is missing is a when-to-use-this-instead-of-X statement; the exclusions present are about post-adoption actions, not alternative tools.

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