Skip to main content
Glama

index_repo

Idempotent

Indexes a local folder or Git repository so other tools can search it; re-run after code changes to re-embed only changed files.

Instructions

Index a repository so the other tools can search it. Use this first, and again after the code changes: re-running only re-embeds files whose content changed. A URL is cloned with full history (blobless), so explain_history works. Reports progress while it runs, and returns file counts and the commit indexed.

Input Schema

NameRequiredDescriptionDefault
nameNoName to index it under. Defaults to the folder or repository name.
sourceYesA local directory, or an https git URL such as https://github.com/owner/repo.

Output Schema

NameRequiredDescriptionDefault
repoYes
rootYes
commitYes
secondsYes
files_seenYes
chunks_totalYes
full_rebuildYes
commits_addedYes
commits_totalYes
files_indexedYesFiles embedded this run (new or changed).
files_removedYes
files_unchangedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.2.1
    • addedInput schema / properties / name / description
      Added value: +"Name to index it under. Defaults to the folder or repository name."
    • addedInput schema / properties / source / description
      Added value: +"A local directory, or an https git URL such as https://github.com/owner/repo."
  2. First observedv0.2.0

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already declare the mutation/idempotent/open-world profile, but the description adds genuine context beyond them: re-runs only re-embed changed files, URLs are cloned blobless with full history so explain_history works, and progress is reported during the run. The only thing not covered is whether re-indexing can overwrite or drop an existing index under the same name.

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?

Four short sentences, front-loaded with the purpose and the 'use first' rule, then incremental re-index behavior, then clone semantics, then return/progress info. No filler and nothing repeated from the schema.

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

Completeness5/5

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

For an indexing/setup tool with two parameters, an output schema and full annotations, the description covers everything an agent needs to decide to call it, when to re-call it, and what side effects to expect.

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 goes slightly beyond by explaining what a URL source actually does (blobless clone with full history), which is behavior an agent needs when choosing between a local path and a remote URL.

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 first sentence states a specific verb and resource ('Index a repository') and ties the purpose to the sibling ecosystem ('so the other tools can search it'), immediately distinguishing it from search, ask_codebase, explain_history and the read-only siblings.

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

Usage Guidelines5/5

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

It explicitly states when to call it ('Use this first') and when to call it again ('again after the code changes'), with the reason re-running is cheap. That ordering constraint is the critical usage fact no sibling name or schema field conveys.

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