Skip to main content
Glama

index_project

Index local source files into a semantic cache to enable AI assistants to find relevant code through semantic search instead of repeatedly reading entire codebases.

Instructions

Index local source files into the cachly semantic cache so AI assistants can use semantic_search to find relevant files instead of re-reading the whole codebase every time. Walks a directory recursively, reads each matching file, and stores a summary + path as a semantic cache entry (prompt = file path + content excerpt, value = relative path). Requires an embedding provider (OPENAI_API_KEY or CACHLY_EMBED_PROVIDER + key). Run once, then re-run after major refactors. TTL=86400 (24h) keeps entries fresh.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
instance_idYesUUID of the cachly instance
dirYesAbsolute path to the directory to index (e.g. /Users/you/myproject/src)
extensionsNoFile extensions to include (default: ["ts","js","go","py","java","rs","md","kt","swift"])
max_filesNoMaximum number of files to index (default: 100)
ttlNoTTL in seconds for indexed entries (default: 86400 = 24 h)
summary_charsNoCharacters to use as summary per file (default: 1200)
namespaceNoSemantic namespace to store under (default: cachly:sem:code)
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes key behaviors: the tool walks directories recursively, reads matching files, stores summaries with TTL=86400, and requires external dependencies (embedding provider). However, it doesn't mention error handling, performance characteristics, or what happens on partial failures.

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?

The description is efficiently structured in three sentences: purpose, process, and operational details. Every sentence adds value—no wasted words. It's front-loaded with the core purpose and progressively adds implementation and usage notes.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex tool with 7 parameters, no annotations, and no output schema, the description does well by covering purpose, process, dependencies, and usage patterns. However, it lacks details on output format (what is returned after indexing) and error scenarios, which would be helpful given the absence of structured output documentation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all 7 parameters thoroughly. The description adds minimal parameter-specific context beyond the schema (e.g., mentioning 'prompt = file path + content excerpt, value = relative path' relates to the indexing process but doesn't directly clarify individual parameters). Baseline 3 is appropriate when schema does the heavy lifting.

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 specific action ('index local source files'), resource ('cachly semantic cache'), and purpose ('so AI assistants can use semantic_search to find relevant files instead of re-reading the whole codebase every time'). It distinguishes itself from siblings like 'semantic_search' by focusing on the indexing/preparation step rather than the search operation.

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?

The description provides explicit guidance on when to use the tool ('Run once, then re-run after major refactors') and includes prerequisites ('Requires an embedding provider'). It also implies when not to use it (e.g., for searching, use 'semantic_search' instead, though not explicitly named).

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/cachly-dev/cachly-mcp'

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