Skip to main content
Glama

locus_index

Index local files or directories to create a BM25 search index and knowledge-graph triples from wikilinks, tags, and prose, skipping unchanged files; run before retrieval.

Instructions

Index a file or directory into Locus. Builds BM25 inverted index, extracts KG triples from wikilinks, tags, and prose sentences. Skips unchanged files (checksum dedup). Run this first.

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": "locus_index"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes
patternNo**/*.md
store_pathNo.locus

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.3.1

TDQS

B3.4/5.0
Behavior4/5

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

With no annotations present, the description carries the full burden and does disclose real behavior: it builds a BM25 index, derives KG triples from wikilinks/tags/prose, and skips unchanged files via checksum dedup — a meaningful idempotency signal an agent could not infer from the name. Gaps remain: it does not say what happens to stale entries when a file changes or is deleted, nor whether writes to store_path are destructive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four short sentences, front-loaded with the core action and followed by artifacts then the dedup caveat and the ordering directive. Nothing is redundant. Minor cost: telegraphic fragments ('Skips unchanged files (checksum dedup)') sacrifice a little readability.

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

Completeness3/5

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

For a no-annotation, no-output-schema tool with three undocumented parameters, the description explains the operation and its side effects on the knowledge base reasonably well. It is still silent on return values, error behavior, and parameter meaning, leaving meaningful gaps for a tool that mutates state on disk.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% across three parameters, so the description must compensate and it largely does not. It never explains what `path` accepts, that `pattern` is a glob limiting which files are indexed (only inferable from the default), or what `store_path` controls. The only indirect hint is the mention of wikilinks/prose, which suggests markdown scope.

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?

States a concrete verb and resource ('Index a file or directory into Locus') and then enumerates the artifacts produced: BM25 inverted index, KG triples from wikilinks/tags/prose. That is far more specific than the bare name. It does not explicitly contrast itself with indexing-adjacent siblings such as locus_ingest_github or locus_ingest_ompa, so the differentiation is incomplete.

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

Usage Guidelines3/5

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

'Run this first' gives a clear ordering cue that this is a prerequisite to the retrieval tools. However, it never states when to use an alternative ingestion path (e.g., for GitHub sources), nor any exclusions or re-index conditions beyond the checksum hint. Usage is implied rather than fully specified.

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