Skip to main content
Glama

svn_health_check

Check the health status of SVN systems and working copies to identify issues and ensure proper repository management.

Instructions

Verificar el estado de salud del sistema SVN y working copy

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Core handler logic for svn_health_check: validates SVN installation, retrieves version, checks working copy validity and repository accessibility using utility functions.
    async healthCheck(): Promise<SvnResponse<{ svnAvailable: boolean; version?: string; workingCopyValid?: boolean; repositoryAccessible?: boolean; }>> { try { // Verificar instalación de SVN const svnAvailable = await validateSvnInstallation(this.config); if (!svnAvailable) { return { success: false, error: 'SVN is not available in the system PATH', command: 'svn --version', workingDirectory: this.config.workingDirectory! }; } // Obtener versión de SVN const versionResponse = await executeSvnCommand(this.config, ['--version', '--quiet']); const version = versionResponse.data as string; // Verificar si estamos en un working copy const workingCopyValid = await isWorkingCopy(this.config.workingDirectory!); let repositoryAccessible = false; if (workingCopyValid) { try { await this.getInfo(); repositoryAccessible = true; } catch (error) { repositoryAccessible = false; } } return { success: true, data: { svnAvailable, version: version.trim(), workingCopyValid, repositoryAccessible }, command: 'health-check', workingDirectory: this.config.workingDirectory! }; } catch (error: any) { return { success: false, error: error.message, command: 'health-check', workingDirectory: this.config.workingDirectory! }; } }
  • index.ts:36-65 (registration)
    MCP server tool registration for 'svn_health_check', calls SvnService.healthCheck() and formats markdown response.
    server.tool( "svn_health_check", "Verificar el estado de salud del sistema SVN y working copy", {}, async () => { try { const result = await getSvnService().healthCheck(); const data = result.data; const statusIcon = data?.svnAvailable ? '✅' : '❌'; const wcIcon = data?.workingCopyValid ? '📁' : '📂'; const repoIcon = data?.repositoryAccessible ? '🔗' : '🔌'; const healthText = `${statusIcon} **Estado del Sistema SVN**\n\n` + `**SVN Disponible:** ${data?.svnAvailable ? 'Sí' : 'No'}\n` + `**Versión:** ${data?.version || 'N/A'}\n` + `${wcIcon} **Working Copy Válido:** ${data?.workingCopyValid ? 'Sí' : 'No'}\n` + `${repoIcon} **Repositorio Accesible:** ${data?.repositoryAccessible ? 'Sí' : 'No'}\n` + `**Directorio de Trabajo:** ${result.workingDirectory}`; return { content: [{ type: "text", text: healthText }], }; } catch (error: any) { return { content: [{ type: "text", text: `❌ **Error:** ${error.message}` }], }; } } );
  • TypeScript interface defining the structure for SVN health check results (though service uses slightly different shape).
    export interface SvnHealthCheck { status: 'healthy' | 'warning' | 'error'; issues: SvnHealthIssue[]; workingCopyValid: boolean; repositoryAccessible: boolean; conflictsDetected: boolean; uncommittedChanges: boolean; lastUpdate: string; }
  • Lazy initialization helper for SvnService instance used by all SVN tools including health check.
    function getSvnService(): SvnService { if (!svnService) { try { svnService = new SvnService(); } catch (error: any) { throw new Error(`SVN configuration error: ${error.message}`); } } return svnService; }

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/gcorroto/mcp-svn'

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