Skip to main content
Glama

index_repository

Index a repository into a knowledge graph for code intelligence, with modes for full, filtered, or cross-repo analysis.

Instructions

Index a repository into the knowledge graph. Special mode 'cross-repo-intelligence': skip extraction, only match Routes/Channels across projects to create CROSS_HTTP_CALLS/CROSS_ASYNC_CALLS/CROSS_CHANNEL edges. Requires target_projects param. Ensure target projects have fresh indexes first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repo_pathYesPath to the repository
modeNoAll 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.full
target_projectsNoProjects to search for cross-repo links (cross-repo-intelligence mode). Use ["*"] for all indexed projects. Run list_projects to see available projects.
persistenceNoWrite compressed artifact to .codebase-memory/graph.db.zst for team sharing. Teammates can bootstrap from the artifact instead of full re-indexing.
Behavior3/5

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

Describes the effect of indexing (knowledge graph insertion) and special mode (specific edges). No annotations provided, so description carries full burden. Lacks details on destructive behavior, idempotency, or error conditions.

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 efficient sentences with front-loaded main action. Every sentence adds value with no redundancy. Special mode details are concise yet informative.

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?

Given the complexity (4 params, enum modes, no output schema), the description covers key aspects: modes, prerequisites for cross-repo mode, and persistence benefit. Lacks return value detail but that's acceptable per rules.

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

Parameters5/5

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

Schema coverage is 100%, but description adds significant value: elaborates on mode semantics, provides usage tips for target_projects, and explains persistence artifact purpose. Greatly enhances meaning beyond the schema.

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?

Clear action ('Index a repository') with specific resource and special mode explanation. Distinguishes from siblings like delete_project, query_graph, etc., as indexing is a unique operation.

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?

Provides guidance for the special mode (requires target_projects, ensures fresh indexes) and mentions persistence for team sharing. Does not explicitly list when to use other modes vs alternatives, but parameter descriptions cover mode selection.

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/DeusData/codebase-memory-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server