Skip to main content
Glama

Index Project

localnest_index_project

Build or refresh semantic indexes for codebases to enable AI agents to search and analyze projects locally, keeping all data on your machine.

Instructions

Build or refresh semantic index for a project or across all roots.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_pathNo
all_rootsNo
forceNo
max_filesNo
response_formatNojson

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYes
metaNo

Implementation Reference

  • The handler implementation for localnest_index_project which invokes vectorIndex.indexProject.
      async ({ project_path, all_roots, force, max_files }, extra) => {
        await emitProgress(extra, 0, max_files, 'index_project started');
        const out = await vectorIndex.indexProject({
          projectPath: project_path,
          allRoots: all_roots,
          force,
          maxFiles: max_files,
          onProgress: async ({ scanned = 0, total = max_files, phase = 'indexing' }) => {
            await emitProgress(extra, scanned, total, phase);
          }
        });
        await emitProgress(
          extra,
          out.scanned_files || out.total_files || max_files,
          out.scanned_files || out.total_files || max_files,
          'index_project completed'
        );
        return normalizeIndexProjectResult(out, max_files);
      }
    );
  • Registration of localnest_index_project tool in src/mcp/tools/retrieval.js.
    registerJsonTool(
      'localnest_index_project',
      {
        title: 'Index Project',
        description: 'Build or refresh semantic index for a project or across all roots.',
        inputSchema: {
          project_path: z.string().optional(),
          all_roots: z.boolean().default(false),
          force: z.boolean().default(false),
          max_files: z.number().int().min(1).max(200000).default(20000)
        },
        annotations: {
          readOnlyHint: false,
          destructiveHint: false,
          idempotentHint: false,
          openWorldHint: false
        }
      },
Behavior3/5

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

The description adds the 'semantic' qualifier to 'index' and distinguishes between 'build' (create) and 'refresh' (update) operations, which adds context beyond the annotations. However, it fails to disclose behavioral implications of idempotentHint=false (retry safety) or readOnlyHint=false (side effects on existing indexes).

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?

The single-sentence description is appropriately front-loaded with action verbs and avoids redundancy. However, extreme brevity comes at the cost of necessary detail given the lack of schema documentation.

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

Completeness2/5

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

Given zero schema descriptions, five parameters, and complex indexing behavior, the description is insufficient. It fails to explain parameter interactions (e.g., project_path vs all_roots mutual exclusivity), the force flag's purpose, or output format options despite the presence of an output schema reducing the need to describe return values.

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

Parameters2/5

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

With 0% schema description coverage, the description must carry the full burden but only implicitly references two parameters ('project' and 'all roots') while leaving three critical parameters—force, max_files, and response_format—completely undocumented and ambiguous.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses specific action verbs ('Build or refresh') with a clear resource ('semantic index') and scope ('project or across all roots'). It effectively distinguishes this tool from sibling 'localnest_index_status' by emphasizing the mutating action versus status checking.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

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

While the description implies usage scenarios ('for a project or across all roots'), it lacks explicit guidance on when to use this versus alternatives, prerequisites (e.g., checking index status first), or warnings about the non-idempotent nature of the operation.

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/wmt-mobile/localnest'

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