Skip to main content
Glama

Index a project

index
Idempotent

Build a searchable codebase map when a tool reports no codebase available. Pass an absolute project path, or comma-separated paths for monorepos, to enable code search and graph queries.

Instructions

Build the code index. Call it only when a tool says "No codebase indexed". Pass an absolute path, or comma-separated paths for a monorepo. A file watcher then keeps it fresh.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "path": "<path>"
    },
    "name": "index"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesAbsolute path of the project
pathsNoMore paths, comma-separated

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.4.6

TDQS

A4.2/5.0
Behavior4/5

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

Beyond the annotations, the description discloses a real side effect: a file watcher keeps the index fresh afterward, which matters because the call changes persistent state (consistent with readOnlyHint=false and idempotentHint=true). It does not mention cost/duration on large repos or what happens if a path is already indexed, which would have earned a 5.

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 short sentences, zero filler, with the trigger condition and the primary usage constraint front-loaded before the parameter note and the watcher aside.

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?

The tool mutates persistent state, but an output schema exists and the description covers the invocation trigger, path semantics, and the ongoing watcher behavior. What's missing is operational context such as indexing duration or handling of already-indexed paths, which is a modest gap rather than a blocking one.

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 both `path` (absolute path) and `paths` (comma-separated extras) are already documented. The description restates the absolute-path and comma-separated-monorepo semantics, adding convenience context but no new format or edge-case detail beyond the schema. Baseline 3 applies.

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?

"Build the code index" states a specific verb and resource, and the name/title ambiguity of "index" is resolved in the first sentence. It doesn't explicitly position itself against the sibling tools (search, graph, map, find_symbol), but those are clearly downstream consumers, so disambiguation is mostly implicit.

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?

"Call it only when a tool says 'No codebase indexed'" is an explicit, observable trigger condition that tells the agent exactly when to invoke it and implicitly when not to. No competing alternative exists among the siblings, so nothing further is required.

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

Deploy Server

Other Tools