Skip to main content
Glama

reindex_file

Reindex a single changed file in a repository to update its symbols and return the new symbol count without reindexing the whole project.

Instructions

Reindexes a single file. Faster than index_project when only one file changed. Returns updated symbol count.

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": {
      "file_path": "<file_path>",
      "repo": "<repo>"
    },
    "name": "reindex_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
repoYesRepository name (as shown in list_repos)
file_pathYesRelative file path within the repository (e.g., 'src/main.py')

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.10.2

TDQS

A4.3/5.0
Behavior3/5

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

With no annotations at all, the description carries the full disclosure burden. It does disclose a side effect (index mutation) and the return value ('updated symbol count'), but says nothing about permissions, whether the repo must already be indexed, or what happens if the path is unknown — meaningful gaps for a write operation.

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, no filler, and the fastest-to-read information (what it does, why over the alternative, what comes back) is front-loaded in that order.

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 two-parameter, non-nested tool this covers purpose, alternative, and return value, which is close to sufficient. The only real gap is mutation semantics — whether reindexing is incremental, what happens on a stale or missing file — which no annotation covers.

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 description coverage is 100% and both parameters carry their own descriptions including a path format example, so the description needn't restate them; what it does add is the implicit constraint that the file must belong to a single already-known repo. Baseline 3 does not apply here since the schema fully documents the parameters and the description wastes no effort duplicating them.

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?

States a specific verb and resource ('Reindexes a single file') and pairs it with the contrasting sibling ('Faster than index_project when only one file changed'), so an agent can distinguish the two scopes without inspecting schemas.

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?

Gives a clear usage condition — prefer this over index_project when only one file changed — which is exactly the decision an agent faces. It stops short of stating the inverse case (when to fall back to index_project for many files) or any prerequisite such as the repo already being indexed.

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