Skip to main content
Glama
marksolly

Code Index MCP

by marksolly

refresh_index

Rebuild the project index manually when files are added, removed, or moved. Use after large file operations or when the index appears outdated.

Instructions

Manually refresh the project index when files have been added/removed/moved.

Use when:
- File watcher is disabled or unavailable
- After large-scale operations (git checkout, merge, pull) that change many files
- When you want immediate index rebuild without waiting for file watcher debounce
- When find_files results seem incomplete or outdated
- For troubleshooting suspected index synchronization issues

Important notes for LLMs:
- Always available as backup when file watcher is not working
- Performs full project re-indexing for complete accuracy
- Use when you suspect the index is stale after file system changes
- **Call this after programmatic file modifications if file watcher seems unresponsive**
- Complements the automatic file watcher system

Returns:
    Success message with total file count

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

No annotations are provided, so description carries full burden. It discloses that the tool performs full re-indexing for accuracy, returns success with file count, and is a backup for file watcher. Could mention whether the operation is synchronous or has performance implications, but current detail is sufficient.

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?

Description is well-structured with a clear header, bullet list for usage, important notes, and return information. Every sentence adds value, no redundancy. Front-loaded with 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?

Given the tool has no parameters and no output schema, the description covers all necessary aspects: purpose, when to use, behavioral notes, and return value. It is complete for an agent to decide and invoke 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?

Input schema has zero parameters, so no param info needed. Baseline for 0 params is 4. Description adds value by explaining behavior, but no parameter semantics required.

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?

Description clearly states the tool refreshes the project index when files change, with a specific verb 'refresh' and resource 'project index'. It distinguishes from sibling tools like find_files and get_file_watcher_status by positioning itself as a manual complement to the automatic file watcher.

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?

Provides explicit when-to-use scenarios: file watcher disabled, after large operations, when find_files outdated, and for troubleshooting. Also notes when not to rely on it (when file watcher works) and gives actionable guidance for LLMs.

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/marksolly/code-scope-mcp'

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