Skip to main content
Glama

refresh_index

Reconcile the full-text search index with disk changes: reindexes modified files, ingests new ones, and prunes stale entries. Use after external edits or when drift is detected.

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 diff_against_disk reports drift.

Input Schema

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

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

No annotations provided, so description carries full burden. It discloses side effects (writes/updates/deletes), idempotency, skipping large files/junk dirs, no auth/rate limits, and return value. Also clarifies prune is destructive on stale rows but never deletes files from disk.

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?

Dense single paragraph, each sentence adds value. Could be more structured (e.g., bullet points) but remains efficient and front-loaded with the main action.

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?

Covers all key aspects: two modes, side effects, idempotency, skips, return value, and references sibling diff_against_disk. No missing critical information for an agent to decide and invoke.

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?

Single parameter project_id with schema coverage 100%. Description adds significant meaning: explains that null/omitted triggers KB mode, and ties parameter to the two distinct behaviors. Goes beyond schema description.

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 clearly states the tool reconciles the FTS index against disk, with two distinct modes (project vs KB). It uses specific verbs (reconcile, re-runs, walks, ingests, reindexes, prunes) and distinguishes itself from siblings like 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 Guidelines4/5

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

Explicitly advises when to use: after editing files outside Kontexta or when diff_against_disk reports drift. Does not explicitly exclude scenarios, but provides clear context.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/safiyu/kontexta'

If you have feedback or need assistance with the MCP directory API, please join our Discord server