lspace_get_repository_info
Retrieve detailed configuration and settings for a specific repository using the Lspace MCP Server, enabling accessible and searchable knowledge management across AI sessions.
Instructions
ℹ️ SETUP: Get detailed configuration for a specific repository.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"repositoryName": "<repositoryName>"
},
"name": "lspace_get_repository_info"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repositoryName | Yes | The unique name of the repository. |
Implementation Reference
- lspace-mcp-server.js:437-520 (handler)Handler implementation for the 'lspace_get_repository_info' tool. Validates input, retrieves repository configs using RepositoryManager, finds the matching repo by name or ID, and returns formatted details about the repository including type, path, GitHub info if applicable, and knowledge base path.
case 'lspace_get_repository_info': if (!args || !args.repositoryName) { return { jsonrpc: "2.0", id, error: { code: -32000, message: 'Missing required parameter: repositoryName' } }; } if (!this.isInitialized || !this.repositoryManager) { return { jsonrpc: "2.0", id, error: { code: -32000, message: 'Repository manager not initialized' } }; } try { const repoIdentifier = args.repositoryName; const repositories = this.repositoryManager.getAllRepositoryConfigs(); // Find repository by name (case-insensitive) OR by ID const repo = repositories.find(r => r.name.toLowerCase() === repoIdentifier.toLowerCase() || r.id === repoIdentifier ); if (!repo) { return { jsonrpc: "2.0", id, result: { content: [ { type: "text", text: `Repository "${repoIdentifier}" not found.\n\nAvailable repositories:\n${repositories.map(r => `• ${r.name} (${r.id})`).join('\n')}` } ] } }; } // Build detailed info let details = `Repository Details:\n• ID: ${repo.id}\n• Name: ${repo.name}\n• Type: ${repo.type}`; if (repo.type === 'local') { details += `\n• Path: ${repo.path}`; } else if (repo.type === 'github') { details += `\n• GitHub: ${repo.owner}/${repo.repo}\n• Branch: ${repo.branch}\n• PAT Alias: ${repo.pat_alias}`; } if (repo.path_to_kb) { details += `\n• Knowledge Base Path: ${repo.path_to_kb}`; } return { jsonrpc: "2.0", id, result: { content: [ { type: "text", text: details } ] } }; } catch (error) { return { jsonrpc: "2.0", id, error: { code: -32000, message: `Failed to get repository details: ${error.message}` } }; } - lspace-mcp-server.js:137-150 (registration)Tool registration in getTools() method, including name, description, and input schema requiring 'repositoryName'.
{ name: "lspace_get_repository_info", description: "ℹ️ SETUP: Get detailed configuration for a specific repository.", inputSchema: { type: "object", properties: { repositoryName: { type: "string", description: "The unique name of the repository." } }, required: ["repositoryName"] } },