Skip to main content
Glama

List config git branches

git_list_branches
Read-onlyIdempotent

Lists all local branches in the Home Assistant config Git repository so you can inspect available branches before switching or merging.

Instructions

List all local branches in the HA config git repository.

Calls _repo() and returns every local branch name from repo.branches.

Returns: list[str] of local branch names. Errors: raises RuntimeError (from _repo()) when gitpython is not installed or no git repo exists yet — run git_init_config first.

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": "git_list_branches"
  }
}

Input Schema

NameRequiredDescriptionDefault

No arguments

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.0.1

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, and closed-world, so safety is covered. The description goes further by disclosing the failure mode (`RuntimeError` from `_repo()` when gitpython is missing or no repo exists) and the remediation (`git_init_config`), which is real value beyond the annotations. The returns line is somewhat redundant with the output schema.

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?

The description is front-loaded with the core action, then uses labeled Returns/Errors lines for fast scanning. It is slightly redundant in repeating "local branch names" across the opening sentence and the Returns line, but no sentence is wasted.

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

Completeness5/5

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

For a no-parameter read tool with full annotation coverage and an output schema, the description covers everything an agent needs: purpose, scope, return type, error condition, and prerequisite. Nothing essential is missing.

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

Parameters4/5

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

The tool takes zero parameters, so the baseline is 4; there is nothing for the description to disambiguate. The absence of parameters is consistent with the stated behavior of returning every local branch.

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 ("List all local branches") and scopes it to the HA config git repository, so an agent knows exactly what it returns. It does not explicitly distinguish itself from siblings like git_checkout_branch or git_create_branch, though the read-only listing scope is unambiguous.

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?

Usage is implied by the read-only listing purpose, and the description gives one useful conditional: run `git_init_config` first if no repo exists. There is no explicit statement of when to prefer this over sibling branch tools or any exclusions.

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

Deploy Server

Other Tools