Skip to main content
Glama

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

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
        }
      },

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