Skip to main content
Glama

index_repository

Idempotent

Index a repository into a knowledge graph with modes for full, moderate, fast, or cross-repo linking, and report coverage gaps.

Instructions

Index a repository. full/moderate add semantics; fast omits them; cross-repo-intelligence links services. Reports coverage gaps.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNofull: all+semantic; moderate: filtered+semantic; fast: filtered only; cross-repo-intelligence: link services.full
nameNoName override; Non-ASCII bytes are encoded; unsafe characters normalized.
repo_pathYesRepository path
persistenceNoWrite .codebase-memory/graph.db.zst.
target_projectsNoCross-repo targets; ["*"] means all.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv0.11.0
    • changedInput schema / properties / mode / description
      Previous value: -"All modes run type-aware LSP call/usage resolution (per-file + cross-file). full: all files + similarity/semantic edges. moderate: filtered files + similarity/semantic. fast: filtered files, no similarity/semantic. cross-repo-intelligence: match Routes/Channels across projects."New value: +"full: all+semantic; moderate: filtered+semantic; fast: filtered only; cross-repo-intelligence: link services."
    • changedInput schema / properties / name / description
      Previous value: -"Override the derived project name. Non-ASCII bytes are encoded and unsafe path characters are normalized."New value: +"Name override; Non-ASCII bytes are encoded; unsafe characters normalized."
    • changedInput schema / properties / persistence / description
      Previous value: -"Write compressed artifact to .codebase-memory/graph.db.zst for team sharing. Teammates can bootstrap from the artifact instead of full re-indexing."New value: +"Write .codebase-memory/graph.db.zst."
    • changedInput schema / properties / repo_path / description
      Previous value: -"Path to the repository"New value: +"Repository path"
    • changedInput schema / properties / target_projects / description
      Previous value: -"Projects to search for cross-repo links (cross-repo-intelligence mode). Use [\"*\"] for all indexed projects. Run list_projects to see available projects."New value: +"Cross-repo targets; [\"*\"] means all."
  2. Changed1 schema field changedv0.10.4
    • changedOutput schema / (root)
      Previous value: -{
      -  "additionalProperties": true,
      -  "type": "object"
      -}New value: +null
  3. Changed2 schema fields changedv0.9.0
    • addedInput schema / properties / name
      Added value: +{
      +  "description": "Override the derived project name. Non-ASCII bytes are encoded and unsafe path characters are normalized.",
      +  "type": "string"
      +}
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "type": "object"
      +}
  4. First observedv1.0.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already mark the tool as not read-only, idempotent, and not destructive; the description adds behavioral detail beyond those flags by explaining what each mode does and noting that the tool 'Reports coverage gaps.' It does not discuss cost, permissions, or persistence side effects, but it supplements the annotation profile meaningfully.

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?

The description is three short sentences with no filler, front-loads the core action, and compresses the mode distinctions into a compact contrast. Every clause earns its place.

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?

With no output schema, the description at least signals what the caller will learn ('Reports coverage gaps') and the mode semantics are covered. It does not describe the return shape or when to prefer sibling coverage tools, but given the 100% parameter schema and annotations, the main operational context is present.

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%, so the schema already documents every parameter. The description's mode language largely restates the schema's enum descriptions rather than adding new parameter-level meaning, and it adds no detail about name, persistence, or target_projects.

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 opens with 'Index a repository,' a specific verb and resource, and clarifies mode differences. It does not explicitly contrast itself with sibling tools like check_index_coverage or index_status, so it stops short of full sibling differentiation.

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 mode summary ('full/moderate add semantics; fast omits them; cross-repo-intelligence links services') gives implied guidance for choosing a mode, but the description never states when to use index_repository instead of related tools such as check_index_coverage or detect_changes. Usage context is present but not explicit.

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