Skip to main content
Glama
mcp-server-git

mcp-server-git

by Arnabdaz

git_branch

List local, remote, or all Git branches in a repository, with optional filters for branches that contain or exclude a specific commit SHA.

Instructions

List Git branches

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": {
      "repo_path": "<repo_path>",
      "branch_type": "<branch_type>"
    },
    "name": "git_branch"
  }
}

Input Schema

NameRequiredDescriptionDefault
containsNoThe commit sha that branch should contain. Do not pass anything to this param if no commit sha is specified
repo_pathYesThe path to the Git repository.
branch_typeYesWhether to list local branches ('local'), remote branches ('remote') or all branches('all').
not_containsNoThe commit sha that branch should NOT contain. Do not pass anything to this param if no commit sha is specified

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.2

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are provided, so the description carries full burden for behavioral disclosure. 'List Git branches' implies a read-only operation but doesn't specify what format the listing returns (simple names vs. detailed info), whether it shows tracking relationships, or if there are any limitations like pagination. For a tool with 4 parameters and no annotation coverage, this is insufficient.

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?

The description is perfectly concise at just three words, front-loading the essential purpose with zero wasted language. Every word earns its place in communicating the core functionality.

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 tool with 4 parameters, no annotations, and no output schema, the description is inadequate. It doesn't explain what the output looks like (branch names, commit pointers, tracking status), doesn't mention error conditions, and provides no context about the tool's behavior beyond the minimal purpose statement.

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?

With 100% schema description coverage, the input schema already documents all 4 parameters thoroughly. The description adds no additional parameter information beyond what's in the schema, so it meets the baseline of 3 where the schema does the heavy lifting.

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 'List Git branches' clearly states the verb ('List') and resource ('Git branches'), making the tool's purpose immediately understandable. However, it doesn't differentiate this tool from its siblings like 'git_status' or 'git_log' which also provide repository information, so it doesn't reach the highest score.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. With siblings like 'git_status' (which shows current branch status) and 'git_log' (which shows commit history), there's no indication of when branch listing is preferred over these other informational tools.

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