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

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.1

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations provided, the description carries the burden of disclosure. It identifies the side effect (adds to status bar) and input validation requirements (absolute path, git root). However, it omits failure modes (what if path doesn't exist), return value structure, and whether adding is 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, zero waste. The first sentence establishes the operation and target; the second specifies the critical path constraint. Efficiently front-loaded with essential information.

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?

Given 4 simple parameters with complete schema documentation, the description is minimally sufficient. However, lacking annotations and output schema, it should ideally describe the success/failure response or what happens when adding a duplicate repo, which would elevate it above baseline adequacy.

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 description coverage is 100%, establishing a baseline of 3. The description adds value by reinforcing the 'absolute' path requirement and 'git repo root' constraint in the second sentence, but does not elaborate on the 'label', 'type', or 'show' parameters beyond what the schema already documents.

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?

States specific action ('Add'), resource ('repository'), and destination ('status bar'). Distinguishes from siblings like 'remove_repo' implicitly through the verb, though it does not explicitly clarify when to prefer this over 'validate_repo_path' or other related tools.

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?

Mentions the path constraint ('must be an absolute filesystem path'), providing a prerequisite. However, it lacks guidance on when to use this vs. 'validate_repo_path' first, whether the operation is idempotent, or when to choose 'active' vs 'reference' types.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.