Skip to main content
Glama

branch_close

Close a rejected branch by recording its conclusion, optionally scoped to a session or task, so reasoning trails end cleanly without affecting active branches.

Instructions

Close a rejected branch with conclusion. Pass sessionId/taskId for task-scoped branching.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "branch_close"
  }
}

Input Schema

NameRequiredDescriptionDefault
taskIdNo
branchIdNo
sessionIdNo
conclusionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full burden. It does not disclose whether closing is reversible, whether the branch's contents or history are destroyed, what permissions are needed, or how 'conclusion' affects the outcome. For a mutating lifecycle operation with zero annotation coverage, this is a substantial gap.

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?

Two short sentences, front-loaded with the action and with no wasted wording. The brevity is efficient, though it shades into under-specification given the missing behavioral detail.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

A mutation tool with no annotations, no output schema, and 0% parameter coverage needs more than two sentences. The description omits irreversibility, required permissions, and what happens to the branch afterward, and its 'with conclusion' phrasing implies a required argument even though the schema marks all four parameters optional.

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

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% across four parameters, so the description must compensate and only partially does: it explains that sessionId/taskId enable task-scoped branching and that 'conclusion' accompanies the close. branchId is never mentioned, and the meaning or format of 'conclusion' (free text? structured?) is not clarified.

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?

The description states a specific verb and resource ('Close a rejected branch') plus a second element ('with conclusion'), which distinguishes it from sibling branch operations like branch_create, branch_merge, or branch_switch. It stops short of naming which sibling to use instead, so it is clear but not fully differentiated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The word 'rejected' implies the triggering condition — close a branch after it has been rejected — so usage is implied rather than spelled out. There is no explicit when-not guidance and no alternative branch tool is named for comparison, leaving the agent to infer the selection logic.

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