Skip to main content
Glama
damian-pramparo

Enterprise Code Search MCP Server

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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: {}
      }
    },
  • 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: {},
    },
  • Input schema definition for list_indexed_projects tool: empty object (no parameters).
    inputSchema: {
      type: "object",
      properties: {}
    }
  • Input schema definition for list_indexed_projects tool in HTTP server: empty object (no parameters).
    inputSchema: {
      type: "object",
      properties: {},
Behavior2/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 states it's a list operation, implying read-only behavior, but doesn't specify details like pagination, rate limits, or what 'indexed' means in practice. This leaves gaps in understanding how the tool behaves beyond basic listing.

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 a single, clear sentence with no wasted words, making it highly concise and front-loaded. It efficiently conveys the core purpose without unnecessary elaboration, which is ideal for this simple tool.

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

Completeness3/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, no annotations, and no output schema, the description is minimally adequate by stating what it does. However, it lacks context on behavior (e.g., return format, limitations) and usage relative to siblings, making it incomplete for optimal agent guidance.

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?

The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description doesn't add parameter details, which is appropriate, earning a high score as it doesn't introduce confusion or redundancy.

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 clearly states the verb ('List') and resource ('projects currently indexed'), making the purpose specific and understandable. However, it doesn't differentiate from sibling tools like 'search_codebase', which might also list projects in some context, so it doesn't reach the highest score.

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?

The description provides no guidance on when to use this tool versus alternatives, such as 'search_codebase' for filtered searches or 'index_local_project' for adding projects. There's no mention of prerequisites, exclusions, or context for usage, leaving the agent without clear direction.

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/damian-pramparo/semantic-context-mcp'

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