Skip to main content
Glama
Lspace-io

Lspace MCP Server

Official
by Lspace-io

lspace_list_repositories

Retrieve and display all repositories managed by the Lspace MCP Server, enabling users to access and organize AI session insights efficiently.

Instructions

📋 SETUP: List all repositories currently managed by Lspace.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Main execution logic for the lspace_list_repositories tool. Checks initialization, fetches repository configs from RepositoryManager, formats a list of repositories with their details, or returns appropriate messages/errors.
    case 'lspace_list_repositories':
      if (!this.isInitialized) {
        return {
          jsonrpc: "2.0",
          id,
          error: {
            code: -32000,
            message: 'Repository manager not initialized'
          }
        };
      }
      
      try {
        const repositories = this.repositoryManager.getAllRepositoryConfigs();
        
        if (repositories.length === 0) {
          return {
            jsonrpc: "2.0",
            id,
            result: {
              content: [
                {
                  type: "text",
                  text: "No repositories are currently managed by Lspace."
                }
              ]
            }
          };
        }
        
        return {
          jsonrpc: "2.0",
          id,
          result: {
            content: [
              {
                type: "text",
                text: `Found ${repositories.length} managed repositories:\n\n` +
                     repositories.map(repo => 
                       `• ${repo.name} (${repo.id})\n  Type: ${repo.type}\n` +
                       (repo.type === 'local' ? `  Path: ${repo.path}\n` : '') +
                       (repo.type === 'github' ? `  GitHub: ${repo.owner}/${repo.repo} (${repo.branch})\n` : '') +
                       (repo.path_to_kb ? `  KB Path: ${repo.path_to_kb}\n` : '')
                     ).join('\n')
              }
            ]
          }
        };
      } catch (error) {
        return {
          jsonrpc: "2.0",
          id,
          error: {
            code: -32000,
            message: `Failed to list repositories: ${error.message}`
          }
        };
      }
  • Tool registration in getTools() method, defining name, description, and empty input schema (no parameters required).
    {
      name: "lspace_list_repositories",
      description: "📋 SETUP: List all repositories currently managed by Lspace.",
      inputSchema: {
        type: "object",
        properties: {},
        required: []
      }
    },
  • Input schema definition for the tool (empty object, no required parameters).
      inputSchema: {
        type: "object",
        properties: {},
        required: []
      }
    },
Install Server

Other Tools

Related 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/Lspace-io/lspace-server'

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