Skip to main content
Glama

switchRepoBranch

Switch the active branch of a Git repository to a specified branch, optionally creating it if missing.

Instructions

Switches the branch of a Git repository.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repoYesThe Git repository.
userNoThe username.
branchYesThe branch name.
createNoWhether to create the branch if it doesn't exist.
passwordNoThe password.
connectionNoOptional: SAP connection name to use for THIS call only (overrides the active connection; see listConnections). Immune to server restarts and concurrent switches.
Behavior2/5

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

No annotations are provided, so the description carries full behavioral disclosure burden. It only says 'switches the branch' without detailing side effects, required permissions, state changes (e.g., handling of uncommitted changes), or whether the operation is local or remote. This is insufficient for safe invocation.

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

Conciseness5/5

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

A single concise sentence that captures the core function. No unnecessary words; every part is essential. However, it is lean to the point of missing important context.

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?

Given 6 parameters (including optional ones like 'user', 'password', 'connection'), no output schema, and no annotations, the description is incomplete. It does not explain the tool's behavior in relation to local vs remote branches, prerequisites (e.g., clean working tree), or what happens with uncommitted changes. A mutation tool like this needs more context for safe use.

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 the baseline is 3. The description adds no parameter-specific meaning beyond the schema's own descriptions. It does not clarify the relationship between 'user', 'password', 'connection', or the 'create' flag, but the schema already provides reasonable descriptions.

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?

The description clearly states the action: 'Switches the branch of a Git repository.' It uses a specific verb ('switches') and resource ('branch of a Git repository'), effectively distinguishing it from sibling tools like gitPullRepo or pushRepo.

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?

No when-to-use or when-not-to-use guidance is provided. While the purpose is clear, the description does not help the agent decide between this and other Git-related sibling tools (e.g., gitPullRepo, pushRepo). Usage context is implied but not explicit.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/rafaelssclaudio/MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server