Skip to main content
Glama

refresh_index

Aligns the full-text search index with on-disk files. Reindexes changed content, ingests new markdown files, and removes stale entries for deleted files.

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 CtxNest, 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?

Discloses side effects (writes/updates/deletes), destructiveness (prunes index rows but never deletes files), idempotency, skip rules (>5MB, junk dirs), and lack of auth/rate limits. All critical behavioral traits are covered.

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?

A single paragraph with multiple sentences, each carrying essential information. No fluff, but slightly verbose; still efficient.

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 scope, actions, idempotency, skip conditions, safety (no file deletion), return format, and usage context. No output schema, but return values are described adequately.

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% for the single parameter. Description adds context about passing null/omit for KB reindex, and explains behavioral differences between scopes. Adds value beyond schema.

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?

Clearly states 'Reconcile the FTS index against disk' and explains the two modes (project vs KB) with specific actions (discoverFiles, ingest, reindex, prune). The distinction from sibling tool diff_against_disk is hinted at in usage guidance.

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 says to use 'after editing files outside CtxNest, or when diff_against_disk reports drift'. No explicit when-not-to-use, but context is clear enough.

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/ctxnest'

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