Skip to main content
Glama

branch_switch

Switch the active branch, including main or task-scoped branches, by passing a sessionId or taskId to keep work organized within a project.

Instructions

Switch to another branch (e.g. main). 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_switch"
  }
}

Input Schema

NameRequiredDescriptionDefault
taskIdNo
branchIdNo
sessionIdNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

B3.1/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 and falls short. It does not say whether the target branch must exist, what happens to working state or context on switch, whether the switch is global or per-session, or what errors result from a bad branch identifier. Only the notion of "task-scoped branching" hints at scoping behavior.

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 core action followed by the scoping modifier. Nothing is wasted, though the terseness leaves little structure for an agent to parse beyond the single example.

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?

For a mutation tool with no annotations, no output schema, and zero parameter documentation, the description is too thin. It omits preconditions, failure modes, and the effect of the switch on existing state, all of which an agent needs before calling it safely.

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 0% across three parameters, so the description must compensate and does so only partially. It names sessionId and taskId and ties them to task-scoped branching, and "another branch (e.g. main)" implies the branchId argument, but it never explains the expected format, whether any parameter is required, or what the default behavior is when they are omitted.

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 uses a specific verb ("Switch") and resource ("another branch") with a concrete example ("main"), which is enough to distinguish it from siblings like branch_create, branch_merge, and branch_close. It stops short of explicitly contrasting with the closest alternatives, so it is clear but not sibling-differentiating.

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?

It offers one conditional usage hint — pass sessionId/taskId for task-scoped branching — which implies the default is a plain branch switch. It never states prerequisites such as whether the target branch must already exist, nor when to prefer branch_create or branch_merge instead.

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