Skip to main content
Glama
agenticbits

@agenticbits/claude-plugin

by agenticbits

get_branch_status

Check current git branch status across multiple repositories to monitor development progress and track changes in real-time.

Instructions

Return the current git branch for every configured repo. Respects the enabled flag and showReferenceRepos toggle.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler for the 'get_branch_status' tool, which gathers branch info for all visible git repositories and formats the output.
    // --- get_branch_status ---
    server.tool(
      "get_branch_status",
      "Return the current git branch for every configured repo. Respects the enabled flag and showReferenceRepos toggle.",
      {},
      async () => {
        const config = loadConfig();
        if (!config.statusbar.enabled) {
          return { content: [{ type: "text", text: "Status bar is disabled. Use toggle_statusbar to enable it." }] };
        }
        const visible = config.repos.filter((r) => {
          if (!r.show) return false;
          if (r.type === "reference" && !config.statusbar.showReferenceRepos) return false;
          return true;
        });
        const branches = getAllBranchInfo(visible);
        const lines = branches.map((b) => {
          const tag = b.type === "reference" ? " [ref]" : "";
          const status = b.error ? `ERROR: ${b.error}` : (b.branch ?? "HEAD detached");
          return `${b.label}${tag}: ${status}`;
        });
        const statusLine = formatStatusLine(branches, config.statusbar.showReferenceRepos);
        return {
          content: [
            { type: "text", text: lines.join("\n") || "(no visible repos)" },
            { type: "text", text: `\nStatus line preview:\n${statusLine}` },
          ],
        };
      }
    );
  • The registration function that orchestrates the registration of all branch-related tools, including 'get_branch_status'.
    export function registerBranchTools(server: McpServer): void {

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