Skip to main content
Glama
agenticbits

@agenticbits/claude-plugin

by agenticbits

check_repo_branch

Retrieve the current git branch for a repository using its label or path to monitor development status and track active work.

Instructions

Get the current branch for a single repo by its label or path.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
identifierYesRepo label or absolute path

Implementation Reference

  • The implementation of the check_repo_branch tool. It looks up the repository by label or path in the configuration, retrieves the branch information using the getBranchInfo helper, and returns the result.
    server.tool(
      "check_repo_branch",
      "Get the current branch for a single repo by its label or path.",
      { identifier: z.string().describe("Repo label or absolute path") },
      async ({ identifier }) => {
        const config = loadConfig();
        const repo = config.repos.find((r) => r.label === identifier || r.path === identifier);
        if (!repo) {
          return { content: [{ type: "text", text: `No repo found matching "${identifier}". Use list_repos to see all configured repos.` }] };
        }
        const info = getBranchInfo(repo);
        const text = info.error
          ? `${info.label}: ERROR — ${info.error}`
          : `${info.label}: ${info.branch ?? "HEAD detached"}`;
        return { content: [{ type: "text", text }] };
      }
    );
  • Registration of the check_repo_branch tool within the registerBranchTools function.
    server.tool(
      "check_repo_branch",
      "Get the current branch for a single repo by its label or path.",
      { identifier: z.string().describe("Repo label or absolute path") },
      async ({ identifier }) => {
        const config = loadConfig();
        const repo = config.repos.find((r) => r.label === identifier || r.path === identifier);
        if (!repo) {
          return { content: [{ type: "text", text: `No repo found matching "${identifier}". Use list_repos to see all configured repos.` }] };
        }
        const info = getBranchInfo(repo);
        const text = info.error
          ? `${info.label}: ERROR — ${info.error}`
          : `${info.label}: ${info.branch ?? "HEAD detached"}`;
        return { content: [{ type: "text", text }] };
      }
    );
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure but fails to indicate whether this is a read-only operation, what format the branch name is returned in, or what happens if the identifier doesn't match a repo (error vs empty response).

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 a single, front-loaded sentence with zero redundancy. Every word serves a purpose in defining the operation, scope, and lookup mechanism.

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?

Adequate for a single-parameter tool, but the absence of an output schema means the description should ideally hint at the return value (e.g., branch name string). As written, it meets minimum viability but leaves operational gaps.

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 baseline is 3. The description aligns with the schema by mentioning 'label or path', but adds no additional semantic depth such as examples, path format requirements, or validation rules beyond the schema's 'Repo label or absolute path'.

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 clearly states the action ('Get'), resource ('current branch'), and target ('single repo'), including the lookup method ('by its label or path'). It lacks explicit differentiation from the sibling tool 'get_branch_status', which could confuse tool selection.

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?

No guidance is provided on when to use this tool versus alternatives, particularly the similarly-named 'get_branch_status' sibling. There are no prerequisites, error conditions, or usage constraints mentioned.

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/agenticbits/claude-plugin'

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