Skip to main content
Glama

projects_refresh_index

Reconcile the full-text search index with disk for a project or knowledge base by reindexing new or changed files and pruning stale rows. Use after external edits or to fix drift.

Instructions

Reconcile the FTS index against disk. For a project (project_id set), re-runs discoverFiles. For the KB (project_id null/omitted), walks knowledge/, ingests new .md files, reindexes any whose content hash drifted, and PRUNES rows for files no longer on disk. SIDE-EFFECTFUL: writes/updates/deletes file and FTS rows (the prune is destructive on stale index rows but never deletes files from disk). Idempotent, running twice is a near no-op. Skips files >5MB and standard junk dirs (node_modules, .git, dist, build, etc.). No external auth or rate limits. Returns {scope, newly_indexed, refreshed, pruned}. Use after editing files outside Kontexta, or when files_diff_against_disk reports drift.

Input Schema

NameRequiredDescriptionDefault
project_idNoProject ID. Pass null or omit to reindex the Knowledge Base.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv6.1.2

TDQS

A4.9/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so thoroughly: it flags SIDE-EFFECTFUL writes/updates/deletes, clarifies the prune is destructive on index rows but never removes files from disk, notes idempotence ('running twice is a near no-op'), documents skip rules (>5MB, `node_modules`, `.git`, `dist`, `build`), and states there is no external auth or rate limiting.

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?

Front-loaded with purpose, then scope branches, then the destructive warning in caps for scannability, then constraints and return shape. Every sentence adds an operational fact; none is filler, despite the length being justified by a no-annotation, side-effectful tool.

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?

Even without an output schema, the description supplies the return shape `{scope, newly_indexed, refreshed, pruned}`, covers both scope modes, states side effects and idempotence, and gives a usage trigger. Nothing an agent needs to invoke it safely and correctly is missing.

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 baseline is 3, but the description adds real meaning beyond the schema by explaining what each branch of `project_id` does (project re-runs `discoverFiles`; KB walks `knowledge/`, ingests new .md, reindexes drifted hashes, prunes missing files). This is semantic value the schema's one-line description does not supply.

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?

Opens with a specific verb+resource ('Reconcile the FTS index against disk') and immediately splits behavior into two precise scopes: project (`project_id` set → `discoverFiles`) and KB (`project_id` null → walks `knowledge/`). An agent can tell exactly what this does without opening the schema, and it is clearly distinguishable from index-adjacent siblings like `files_diff_against_disk`.

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?

Ends with an explicit trigger: 'Use after editing files outside Kontexta, or when `files_diff_against_disk` reports drift.' It names the sibling tool that signals when this one is needed, and the branch semantics tell the agent which mode to select via `project_id`.

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