Skip to main content
Glama
modelcontextprotocol

git MCP server

Official

git_branch

Read-onlyIdempotent

List local, remote, or all Git branches in a repository, optionally filtering by commit SHA they contain or do not contain.

Instructions

List Git branches

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. Changed1 schema field changedv2.0.0
    • changedInput schema / title
      Previous value: -"GitBranch"New value: +"branchArguments"
  2. Addedv1.0.0

TDQS

C2.9/5.0
Behavior2/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false, and openWorldHint=false, so the safety profile is covered. The description adds no behavioral context beyond the word 'List', such as return format, filtering behavior, or handling of remote branches.

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

Conciseness3/5

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

The description is short and front-loaded with the core action. However, it is under-specified for a tool with required branch_type and optional commit filters, so it is not appropriately sized to support reliable invocation.

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

Completeness3/5

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

The rich input schema and annotations reduce the description's burden, and no output schema is present. Still, the description omits the key distinction between local, remote, and all branches and the contains/not_contains filtering capability, leaving the agent to infer these entirely from the schema.

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 100%, so all four parameters are documented in the schema. The description adds no parameter meaning beyond what the schema already provides, making the baseline score of 3 appropriate.

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 clear verb and resource: 'List Git branches'. It distinguishes the tool from write-oriented siblings like git_create_branch and git_checkout by using 'List', but it does not explicitly differentiate among the several read-only siblings such as git_status and git_log.

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?

There is no guidance on when to use this tool versus alternatives. The description gives no conditions, no exclusions, and no mention of related tools like git_create_branch or git_log.

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