list_indexed_projects
Retrieve a list of all projects currently indexed for semantic code search across local projects and Git repositories using AI embeddings.
Instructions
List all projects currently indexed
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "list_indexed_projects"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/shared/CodeSearchEngine.ts:315-367 (handler)Core handler function that retrieves all indexed projects from ChromaDB by querying metadata, grouping by project_id, counting chunks per project, and returning a formatted markdown list.
async listIndexedProjects() { const collection = await this.getOrCreateCollection(); const results = await collection.get({ limit: 100000, include: [IncludeEnum.Metadatas] }); const metadatas = results.metadatas as any[] | undefined; if (!metadatas || metadatas.length === 0) { return { content: [ { type: "text", text: "No projects indexed yet." } ] }; } const projects = new Map<string, any>(); metadatas.forEach((metadata: any) => { if (!metadata) return; const projectId = metadata.project_id; if (!projectId) return; if (!projects.has(projectId)) { projects.set(projectId, { project_id: projectId, project_name: metadata.project_name, project_path: metadata.project_path, source_type: metadata.source_type, indexed_at: metadata.indexed_at, chunk_count: 0 }); } projects.get(projectId).chunk_count++; }); let output = `# Indexed Projects (${projects.size})\n\n`; Array.from(projects.values()).forEach(project => { output += `## ${project.project_name}\n`; output += `- **ID:** ${project.project_id}\n`; output += `- **Path:** ${project.project_path}\n`; output += `- **Source:** ${project.source_type}\n`; output += `- **Chunks:** ${project.chunk_count}\n\n`; }); return { content: [ { type: "text", text: output } ] }; } - src/index.ts:87-94 (registration)Tool registration in the stdio MCP server (src/index.ts), including name, description, and empty input schema.
{ name: "list_indexed_projects", description: "List all projects currently indexed", inputSchema: { type: "object", properties: {} } }, - src/http-server.ts:199-204 (registration)Tool registration in the HTTP MCP server (src/http-server.ts), including name, description, and empty input schema.
name: "list_indexed_projects", description: "List all indexed projects in the knowledge base", inputSchema: { type: "object", properties: {}, }, - src/index.ts:90-93 (schema)Input schema definition for list_indexed_projects tool: empty object (no parameters).
inputSchema: { type: "object", properties: {} } - src/http-server.ts:201-203 (schema)Input schema definition for list_indexed_projects tool in HTTP server: empty object (no parameters).
inputSchema: { type: "object", properties: {},