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"}]` }] };
      }
    );
Behavior3/5

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

With no annotations provided, the description carries the full burden but only discloses the basic action. It omits important behavioral details: whether changes persist across sessions, if the operation validates the git repo, error handling for invalid paths, and whether duplicate adds are idempotent.

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?

Two sentences with zero waste: first establishes purpose, second provides critical constraint. Every word earns its place with no redundancy or filler content.

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?

For a 4-parameter state-modifying tool with no output schema, the description covers the essential action and path constraint. However, it lacks completeness regarding side effects, persistence model, and relationship to validation utilities given the mutation nature of the operation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

While schema coverage is 100% (baseline 3), the description adds valuable semantic specificity beyond the schema: it emphasizes 'root' (indicating subdirectories won't work) and 'filesystem' (clarifying not a URL), enhancing understanding of the path parameter requirements.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action (add), resource (repository), and destination (status bar). It effectively distinguishes from siblings like remove_repo, list_repos, and validate_repo_path by specifying the 'add' operation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides a critical usage constraint (path must be absolute filesystem path to git repo root), but lacks explicit guidance on when to use this versus validate_repo_path or prerequisites for the path parameter.

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