Skip to main content
Glama
agenticbits

@agenticbits/claude-plugin

by agenticbits

add_repo

Add a git repository to the Claude interface status bar for monitoring branches and tracking development or reference repositories.

Instructions

Add a repository to the status bar. The path must be an absolute filesystem path to a git repo root.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesAbsolute path to the git repo
labelYesShort display label, e.g. 'payment-service'
typeNo'active' for dev repos, 'reference' for read-only refsactive
showNoWhether to show this repo in the status bar immediately

Implementation Reference

  • The handler function for the `add_repo` tool, responsible for validating inputs and updating the configuration.
    async ({ path, label, type, show }) => {
      const config = loadConfig();
      const exists = config.repos.find((r) => r.path === path || r.label === label);
      if (exists) {
        return { content: [{ type: "text", text: `Repo already configured: ${exists.label} (${exists.path}). Use set_repo_visibility or remove_repo first.` }] };
      }
      if (!isGitRepo(path)) {
        return { content: [{ type: "text", text: `Warning: "${path}" does not appear to be a git repo. Added anyway — verify the path is correct.` }] };
      }
      const repo: RepoConfig = { path, label, type, show };
      config.repos.push(repo);
      saveConfig(config);
      return { content: [{ type: "text", text: `Added repo: ${label} (${path}) [${type}, ${show ? "visible" : "hidden"}]` }] };
    }
  • The Zod schema definition for the `add_repo` tool arguments.
    {
      path: z.string().describe("Absolute path to the git repo"),
      label: z.string().describe("Short display label, e.g. 'payment-service'"),
      type: z.enum(["active", "reference"]).default("active").describe("'active' for dev repos, 'reference' for read-only refs"),
      show: z.boolean().default(true).describe("Whether to show this repo in the status bar immediately"),
    },
  • Registration of the `add_repo` tool within the McpServer instance.
    server.tool(
      "add_repo",
      "Add a repository to the status bar. The path must be an absolute filesystem path to a git repo root.",
      {
        path: z.string().describe("Absolute path to the git repo"),
        label: z.string().describe("Short display label, e.g. 'payment-service'"),
        type: z.enum(["active", "reference"]).default("active").describe("'active' for dev repos, 'reference' for read-only refs"),
        show: z.boolean().default(true).describe("Whether to show this repo in the status bar immediately"),
      },
      async ({ path, label, type, show }) => {
        const config = loadConfig();
        const exists = config.repos.find((r) => r.path === path || r.label === label);
        if (exists) {
          return { content: [{ type: "text", text: `Repo already configured: ${exists.label} (${exists.path}). Use set_repo_visibility or remove_repo first.` }] };
        }
        if (!isGitRepo(path)) {
          return { content: [{ type: "text", text: `Warning: "${path}" does not appear to be a git repo. Added anyway — verify the path is correct.` }] };
        }
        const repo: RepoConfig = { path, label, type, show };
        config.repos.push(repo);
        saveConfig(config);
        return { content: [{ type: "text", text: `Added repo: ${label} (${path}) [${type}, ${show ? "visible" : "hidden"}]` }] };
      }
    );

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