Skip to main content
Glama
gcorroto

SVN MCP Server

by gcorroto

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;
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. While it indicates this is a read-only diagnostic operation ('verificar el estado'), it doesn't describe what the health check actually entails, what specific aspects are examined, whether it requires authentication, if it has side effects, or what the output format looks like. For a diagnostic tool with zero annotation coverage, this is insufficient.

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, efficient sentence in Spanish that directly states the tool's purpose without any unnecessary words. It's appropriately sized for a no-parameter diagnostic tool and is completely front-loaded with the essential information.

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 and no output schema, the description provides the basic purpose but lacks important context. For a health check tool, users would benefit from knowing what aspects are checked, what format the results take, and how this differs from similar sibling tools. The description is minimally adequate but leaves significant gaps in understanding the tool's behavior and output.

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 tool has zero parameters, and schema description coverage is 100% (since there are no parameters to describe). The description appropriately doesn't discuss parameters since none exist. According to the scoring rules, 0 parameters = baseline 4, as there's nothing for the description to compensate for.

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 tool's purpose: 'Verificar el estado de salud del sistema SVN y working copy' (Check the health status of the SVN system and working copy). It uses specific verbs ('verificar' - check/verify) and identifies the target resources (SVN system and working copy). However, it doesn't explicitly differentiate from sibling tools like 'svn_diagnose' or 'svn_status', which might have overlapping functionality.

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. It doesn't mention when this health check is appropriate (e.g., troubleshooting, routine monitoring) or when other tools like 'svn_diagnose' or 'svn_status' might be better suited. There's no context about prerequisites, timing, or exclusions.

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

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