Skip to main content
Glama

contentrain_merge

Destructive

Merges a review-mode branch into the contentrain branch using local git operations, syncing .contentrain files and pruning the merged branch—no external platform required.

Instructions

Merge a review-mode branch into contentrain. Local git operation — no external platform needed. Merges the feature branch into the contentrain branch, advances the base branch via update-ref, selectively syncs .contentrain/ files to the working tree, and prunes the merged branch. Target by exact "branch" name, or resolve by "model" (+ optional "locale"/"latest").

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": {
      "confirm": "<confirm>"
    },
    "name": "contentrain_merge"
  }
}

Input Schema

NameRequiredDescriptionDefault
modelNoResolve the branch by model id (e.g. "blog-post").
branchNoExact branch name to merge (e.g. cr/content/blog-post/...). Omit to resolve by model.
latestNoWhen multiple branches match the model, merge the most recently committed one.
localeNoNarrow model resolution to a locale.
confirmYesMust be true to confirm the merge

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv1.0.21
    • changedInput schema / properties / branch / description
      Previous value: -"Branch name to merge (e.g. cr/normalize/extract/...)"New value: +"Exact branch name to merge (e.g. cr/content/blog-post/...). Omit to resolve by model."
    • addedInput schema / properties / latest
      Added value: +{
      +  "description": "When multiple branches match the model, merge the most recently committed one.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / locale
      Added value: +{
      +  "description": "Narrow model resolution to a locale.",
      +  "type": "string"
      +}
    • addedInput schema / properties / model
      Added value: +{
      +  "description": "Resolve the branch by model id (e.g. \"blog-post\").",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "branch",
      -  "confirm"
      -]New value: +[
      +  "confirm"
      +]
  2. Addedv0.1.5

TDQS

A4.3/5.0
Behavior5/5

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

Annotations already flag destructive=true and non-idempotent, but the description adds real substance beyond them: it enumerates the concrete side effects (base branch advanced via update-ref, .contentrain/ selectively synced to the working tree, merged branch pruned). An agent knows exactly what state changes and what is destroyed before calling.

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?

Three sentences, front-loaded with the core action, then the operational nature, then targeting. Dense but every clause carries information; only the update-ref/working-tree detail borders on implementation trivia for a calling agent.

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 a destructive, non-idempotent mutation with no output schema, the description covers side effects, environment, and targeting adequately. It does not say what the tool returns or what happens on merge conflict/failure, which an agent would benefit from knowing.

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 coverage is 100%, so every parameter is already documented, and the description mostly restates the same resolution rules (branch exact, or model + optional locale/latest). It adds only marginal value, such as implying branch takes precedence, so the baseline 3 applies.

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+resource: "Merge a review-mode branch into contentrain," and names the exact mechanism (feature branch → contentrain branch). This is distinguishable from siblings like contentrain_apply, contentrain_submit, or contentrain_reconcile without opening any schema.

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?

Gives clear usage context: it applies to review-mode branches and is a local git operation requiring no external platform, plus two targeting modes (exact branch vs. model resolution). It does not explicitly say when NOT to use it or name an alternative sibling, so it stops short of a 5.

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