Skip to main content
Glama

repo_index_repository

Index a local repository for semantic code search. Scans files, splits them into functions/classes, and generates embeddings for retrieval.

Instructions

Index a local repository for semantic code search. Scans files, splits them into function/class chunks, generates embeddings using Ollama, and stores them in ChromaDB.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesAbsolute path to the repository root directory.
Behavior4/5

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

With no annotations provided, the description carries the burden of disclosing behavior. It explicitly lists the steps: scans files, splits into chunks, generates embeddings using Ollama, and stores in ChromaDB. It also mentions external dependencies (Ollama, ChromaDB). It does not detail side effects like whether the index is cleared or appended, but the core behavior is transparent.

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 a single, well-structured sentence that front-loads the purpose and then concisely enumerates the processing steps. There is no wasted wording or redundant information.

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 tool with one parameter, no annotations, and no output schema, the description adequately explains what it does, why (semantic search), and how (pipeline with Ollama and ChromaDB). It could mention expected return values or potential performance caveats, but given the simplicity of the input, it is sufficiently complete.

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?

The schema fully describes the only parameter (path as 'Absolute path to the repository root directory'), so schema description coverage is 100%. The description does not add further parameter semantics, but none are needed. Baseline 3 is appropriate.

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 tool's function: 'Index a local repository for semantic code search.' It uses a specific verb ('Index') and resource ('local repository'), and goes on to describe the pipeline (scan, chunk, embed, store), which distinguishes it from sibling tools like repo_analyze_repository or repo_scan_files.

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?

The phrase 'for semantic code search' provides clear context on when to use this tool. It implies this is a prerequisite for querying with repo_ask_codebase, though it does not explicitly name alternatives or state when not to use it. Still, the intended use case is evident.

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/dawnmcp/DawnMCP-1'

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