Skip to main content
Glama

projects.refresh_index

Reconcile the full-text search index with disk changes: ingest new or modified markdown files, refresh drifted content, and prune stale rows for removed files. Use after external edits or when drift is reported.

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

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv4.7.2

TDQS

A4.9/5.0
Behavior5/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 fully delivers: it discloses write/delete effects, explicitly calls the prune 'destructive on stale index rows' while clarifying files on disk are never deleted, notes idempotency, skip rules (>5MB, junk dirs), and absence of auth/rate limits. No important side effect is hidden.

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?

Every sentence earns its place: scope explanation, side effects, idempotency, limits, return shape, and usage trigger. Despite being longer than typical descriptions, it is densely packed with non-redundant information and front-loads the primary purpose.

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?

This is a side-effectful tool with two modes, yet the description covers all needed context: what it reconciles, what it writes/deletes, what it skips, return shape, and when to use it. Even without an output schema, the agent knows exactly what to expect and how to invoke this correctly.

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 the baseline is 3. The description adds meaning by explaining the behavioral difference between project_id set (re-runs discoverFiles) and null/omitted (walks knowledge/, prunes stale rows), which goes beyond the schema's generic 'Pass null or omit' phrasing.

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 opens with a specific verb-resource pair: 'Reconcile the FTS index against disk.' It then partitions the behavior by project vs KB scope, making the tool's dual-mode purpose explicit and distinguishing it from siblings like files.diff_against_disk and files.search.

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 explicit usage guidance: 'Use after editing files outside Kontexta, or when files.diff_against_disk reports drift.' This directly tells the agent when to invoke it and ties it to a sibling tool's signal, making the trigger condition unambiguous.

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