Skip to main content
Glama

Start Merge

start_merge
Destructive

Merge sourceProjectId into projectId (the target). This changes the target: its code becomes the merged code, and the migration script runs on its database and storage. Only when the user asked to merge.

  • targetVersion / sourceVersion: from the latest compare_branches. conflictSides: conflict path → "source" | "target" (that branch's current file wins). addKeys: new env vars from compare to add to the target. keyChoices: env var → "target" | "source" for every key conflict ("source" overwrites the target's value). appIcon: take the source's app icon (default: as compare says).

  • Waits up to ~40 s for the pre-merge checks ("Checks still running" → call again), then starts the merge and returns its mergeId for get_merge_status.

  • A started merge ends done (code + migration applied) or failed (nothing changed on the target).

  • Into a protected main: not started; the user presses Merge in the card it shows, then get_job_status gives the mergeId.

  • Refused, with the reason, on failed checks, unresolved conflicts, changed versions, an already merged branch or a running merge.

  • Migration script: static/__dev/migration.js on the branch the merge edits (never main); dry-run, then run in one transaction on the target on every merge, so idempotent; ctx.sourceQuery / targetQuery / storageCopy / storageDelete only, no network, ~7 min per run. get_guides("fork").

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": {
      "projectId": "<projectId>",
      "sourceProjectId": "<sourceProjectId>",
      "targetVersion": "<targetVersion>",
      "sourceVersion": "<sourceVersion>"
    },
    "name": "start_merge"
  }
}

Input Schema

NameRequiredDescriptionDefault
noteNo
addKeysNo
appIconNo
projectIdYes
keyChoicesNo
conflictSidesNo
sourceVersionYes
targetVersionYes
sourceProjectIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true, but the description goes well beyond: it names exactly what is mutated (target code, database, storage), the ~40 s pre-check wait, the two terminal outcomes (done vs failed with nothing changed on the target), and the refusal conditions (failed checks, unresolved conflicts, changed versions, already merged, running merge). The migration-script constraints (idempotent, no network, ~7 min, allowed ctx APIs) are unusually rich context for a destructive operation.

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?

Front-loaded with the core action and effect, then organized into scannable bullets covering parameters, timing, outcomes, refusals, and migration rules. Dense but nearly every clause carries operational information; the migration-script bullet is long but justified for a destructive tool.

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 a 9-parameter destructive mutation with no output schema, the description supplies the return value (mergeId for get_merge_status), the wait/retry behavior, the full failure taxonomy, and the side-effect surface. An agent has enough to decide, invoke, and interpret the result without further discovery.

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?

With 0% schema description coverage across 9 parameters, the description carries the burden and mostly succeeds: it explains targetVersion/sourceVersion provenance, conflictSides semantics, addKeys, keyChoices precedence ('source' overwrites target), and appIcon default. Gaps remain — 'note' is never mentioned, and projectId/sourceProjectId are only implied by the opening sentence rather than described as identifiers.

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?

Opens with a precise verb and direction: 'Merge sourceProjectId into projectId (the target)', then states the concrete effect on the target (code becomes merged code, migration runs on its database and storage). This distinguishes it cleanly from compare_branches, get_merge_status, and card_confirm_merge.

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?

Explicit gating: 'Only when the user asked to merge.' It also routes the agent for the protected-main case (not started; user presses Merge in the card, then get_job_status yields the mergeId) and for the 'Checks still running' case (call again). Alternatives and when-not conditions are both named.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources