Skip to main content
Glama

git_current_branch

Identify the currently checked-out branch in a Git repository at a given path. Use it to confirm which branch is active before committing or switching.

Instructions

Get the name of the currently checked-out branch.

Args: path: Path to the git repository, relative to the workspace root.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNo.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden. It implies a read-only lookup but never states read-only semantics, nor what happens outside a repo, in a detached-HEAD state, or on an invalid path. Only the path-relative-to-workspace-root note adds any context.

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?

One sentence for the purpose plus a short Args block; nothing is padded. The structure is front-loaded and easy to scan, though the Args block repeats a field name the schema already exposes.

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

Completeness4/5

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

For a single-parameter read tool with no output schema and no annotations, the description covers purpose and parameter meaning adequately. Missing edge-case behavior is minor given the tool's simplicity.

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?

Schema coverage is 0%, so the description must compensate, and it does: 'Path to the git repository, relative to the workspace root' explains what the parameter points at and how it is resolved. It omits mention of the '.' default that the schema declares, but the core semantics are covered.

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?

States a specific verb and resource: 'Get the name of the currently checked-out branch.' This is clearly distinct from the sibling git_branches (which lists branches), though the description never names that sibling explicitly, so the differentiation is implicit rather than stated.

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 when-to-use or when-not-to-use guidance, and no reference to the sibling git_branches as the alternative for enumerating branches. The agent must infer from the purpose text alone that this returns a single branch rather than a list.

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