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 }] };
      }
    );

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