Skip to main content
Glama

Ctx Rebuild Index

ctx_rebuild_index
Idempotent

Rebuild the FAISS HNSW vector index from stored chunks after installing sentence-transformers or when the index is stale or corrupted, then persist it to disk.

Instructions

Rebuild the FAISS HNSW vector index from all stored chunks.

Call this once after installing sentence-transformers, or when the index is stale / corrupted. Embeds every chunk in the DB and persists the index to ~/.loom/vectors/.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "ctx_rebuild_index"
  }
}

Input Schema

NameRequiredDescriptionDefault

No arguments

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.3

TDQS

A4.4/5.0
Behavior4/5

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

Beyond the annotations, the description adds meaningful behavior. It explains that the tool embeds every chunk in the DB and persists the index to ~/.loom/vectors/. That reveals the cost, the on-disk side effect, and the directory affected, which goes beyond the readOnly=false and idempotent=true hints. It does not hint at runtime or resource cost for a full re-embed, which is a minor gap.

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 sentences are well structured. The action comes first, followed by the conditions for calling it and the persistence detail. There is no unnecessary wording.

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 zero-parameter, idempotent maintenance tool with an output schema, the definition covers what the tool does, when to invoke it, and the side effect on disk. Only the approximate cost or duration of re-embedding everything is left implicit.

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?

The tool takes no parameters, so the baseline is 4. The description adds no parameter meaning, but none is needed, and it does not get in the way.

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 names a specific verb and resource: "Rebuild the FAISS HNSW vector index from all stored chunks." It also states the source of the input, so it is distinguishable from related tools such as ctx_vector_stats (which reports on the index) and ctx_vacuum (which likely compacts storage rather than re-embedding).

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?

It gives explicit triggers: "Call this once after installing sentence-transformers, or when the index is stale / corrupted." That is clear guidance on when to use it. It does not explicitly exclude alternatives, such as ctx_vacuum or ctx_health, or say when not to rebuild, so it falls just short of the top score.

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