Skip to main content
Glama

Index Repositories

repo_index

Generate per-user external indexes for local repositories and add them to the local catalog; use discover to locate repos and dryRun for a read-only preview.

Instructions

Index local repositories: generate per-user external indexes and add them to the local catalog. Pass discover:true to find repository roots under the given paths first. Pass dryRun:true to discover and report without writing any indexes or catalog (read-only). Without dryRun this mutates the persistent local catalog, so it is not a pure read.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "repo_index"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNoSingle repository path.
depthNoMaximum discovery depth.
limitNoMaximum discovered repositories.
pathsNoRepository paths, or roots when discover is true.
dryRunNoDiscover and report repositories without writing indexes or mutating the catalog. Read-only. Defaults to false.
catalogNoOptional catalog JSON path.
discoverNoDiscover repositories under the provided paths before indexing.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior5/5

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

The description adds real behavioral context beyond readOnlyHint=false: indexing writes to the persistent local catalog, dryRun is genuinely read-only, and without it the call mutates state. It explicitly warns 'it is not a pure read', so the mutation profile is clear.

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?

Three sentences, front-loaded with the core action, then the two mode flags, then the mutation warning. No filler; the read-only caveat is worth its space.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 7-parameter mutation tool with no output schema, the description covers the action, the two critical flags, and the side effects. It doesn't say what the indexing produces in terms of reported results, a minor gap.

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?

Schema coverage is 100%, so the baseline is 3; the description nevertheless explains the effect of two key flags (discover and dryRun) in terms of behavior, not just type. The remaining parameters (path, paths, depth, limit, catalog) are left to the schema.

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?

The description gives a specific verb+resource ('Index local repositories') plus concrete outputs (per-user external indexes, local catalog), which clearly separates it from inspection/mapping siblings like repo_map and repo_inspect. It never names a sibling directly, so it stops short of a 5.

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

Usage Guidelines4/5

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

It clearly states the conditions selecting each mode: discover:true to find roots first, dryRun:true to report without writing. What is missing is any guidance on when to prefer this over a sibling such as repo_inspect or repo_map.

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