Skip to main content
Glama
onesmartguy

Agentic Bits Claude Plugin

by onesmartguy

check_repo_branch

Retrieve the current git branch for a repository using its label or path. This tool helps developers track active branches within the Agentic Bits Claude Plugin.

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 handler and registration for the check_repo_branch tool.
    // --- check_repo_branch ---
    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 full burden. While 'Get' implies read-only behavior, it fails to disclose error conditions (non-existent repo), return format (string vs object), or idempotency. This is a significant gap for a tool requiring safe operational context.

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?

Single sentence, front-loaded with the action verb. Every clause earns its place: 'Get' (action), 'current branch' (resource), 'single repo' (scope), 'by its label or path' (input method). No redundancy or verbosity.

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?

Given the tool's simplicity (1 parameter, 100% schema coverage, no nested objects), the description adequately covers the core functionality. It implies the return value is the branch name. Minor gap: no mention of error handling or exact return type structure, though acceptable for this complexity level.

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 coverage is 100%, establishing a baseline of 3. The description repeats 'by its label or path' which mirrors the schema's 'Repo label or absolute path' without adding syntax details, format constraints, or examples beyond what the structured schema already provides.

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 uses specific verb 'Get' with clear resource 'current branch' and scope 'single repo'. It implies distinction from sibling get_branch_status (which likely returns status metadata) by focusing solely on retrieving the branch name. However, it lacks explicit differentiation from siblings like validate_repo_path.

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 explicit when-to-use guidance or prerequisites are provided. The description does not mention whether the repo must exist beforehand (likely managed by add_repo) or what error occurs if the identifier is invalid, leaving gaps for agent selection logic.

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/onesmartguy/agentic-bits-claude-plugin'

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