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
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- lspace-mcp-server.js:378-436 (handler)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}` } }; }
- lspace-mcp-server.js:128-136 (registration)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: [] } },
- lspace-mcp-server.js:131-136 (schema)Input schema definition for the tool (empty object, no required parameters).inputSchema: { type: "object", properties: {}, required: [] } },