Skip to main content
Glama
gcorroto

SVN MCP Server

by gcorroto

svn_checkout

Check out files from an SVN repository to a local directory, specifying revision, depth, and other options for repository management.

Instructions

Hacer checkout de un repositorio SVN

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesURL del repositorio SVN
pathNoDirectorio destino
revisionNoRevisión específica
depthNoProfundidad del checkout
forceNoForzar checkout
ignoreExternalsNoIgnorar externals

Implementation Reference

  • Core handler function that implements the SVN checkout logic by building command arguments (revision, depth, force, ignore-externals) and executing the 'svn checkout' command.
    async checkout(
      url: string,
      path?: string,
      options: SvnCheckoutOptions = {}
    ): Promise<SvnResponse<string>> {
      try {
        if (!validateSvnUrl(url)) {
          throw new SvnError(`Invalid SVN URL: ${url}`);
        }
    
        const args = ['checkout'];
        
        if (options.revision) {
          args.push('--revision', options.revision.toString());
        }
        
        if (options.depth) {
          args.push('--depth', options.depth);
        }
        
        if (options.force) {
          args.push('--force');
        }
        
        if (options.ignoreExternals) {
          args.push('--ignore-externals');
        }
    
        args.push(url);
        
        if (path) {
          if (!validatePath(path)) {
            throw new SvnError(`Invalid path: ${path}`);
          }
          args.push(normalizePath(path));
        }
    
        const response = await executeSvnCommand(this.config, args);
    
        return {
          success: true,
          data: cleanOutput(response.data as string),
          command: response.command,
          workingDirectory: response.workingDirectory,
          executionTime: response.executionTime
        };
    
      } catch (error: any) {
        throw new SvnError(`Failed to checkout: ${error.message}`);
      }
    }
  • index.ts:282-319 (registration)
    MCP tool registration for 'svn_checkout', including input schema with Zod validation and thin wrapper handler that delegates to SvnService.checkout.
      "svn_checkout",
      "Hacer checkout de un repositorio SVN",
      {
        url: z.string().describe("URL del repositorio SVN"),
        path: z.string().optional().describe("Directorio destino"),
        revision: z.union([z.number(), z.literal("HEAD")]).optional().describe("Revisión específica"),
        depth: z.enum(["empty", "files", "immediates", "infinity"]).optional().describe("Profundidad del checkout"),
        force: z.boolean().optional().default(false).describe("Forzar checkout"),
        ignoreExternals: z.boolean().optional().default(false).describe("Ignorar externals")
      },
      async (args) => {
        try {
          const options = {
            revision: args.revision,
            depth: args.depth,
            force: args.force,
            ignoreExternals: args.ignoreExternals
          };
          
          const result = await getSvnService().checkout(args.url, args.path, options);
          
          const checkoutText = `📥 **Checkout Completado**\n\n` +
            `**URL:** ${args.url}\n` +
            `**Destino:** ${args.path || 'Directorio actual'}\n` +
            `**Comando:** ${result.command}\n` +
            `**Tiempo de Ejecución:** ${formatDuration(result.executionTime || 0)}\n\n` +
            `**Resultado:**\n\`\`\`\n${result.data}\n\`\`\``;
    
          return {
            content: [{ type: "text", text: checkoutText }],
          };
        } catch (error: any) {
          return {
            content: [{ type: "text", text: `❌ **Error:** ${error.message}` }],
          };
        }
      }
    );
  • TypeScript interface defining the options schema for SVN checkout operation.
    export interface SvnCheckoutOptions {
      revision?: number | 'HEAD';
      depth?: 'empty' | 'files' | 'immediates' | 'infinity';
      force?: boolean;
      ignoreExternals?: boolean;
    }
  • MCP tool handler function that validates input, maps args to options, calls the core SvnService.checkout, formats success/error response with execution details.
    async (args) => {
      try {
        const options = {
          revision: args.revision,
          depth: args.depth,
          force: args.force,
          ignoreExternals: args.ignoreExternals
        };
        
        const result = await getSvnService().checkout(args.url, args.path, options);
        
        const checkoutText = `📥 **Checkout Completado**\n\n` +
          `**URL:** ${args.url}\n` +
          `**Destino:** ${args.path || 'Directorio actual'}\n` +
          `**Comando:** ${result.command}\n` +
          `**Tiempo de Ejecución:** ${formatDuration(result.executionTime || 0)}\n\n` +
          `**Resultado:**\n\`\`\`\n${result.data}\n\`\`\``;
    
        return {
          content: [{ type: "text", text: checkoutText }],
        };
      } catch (error: any) {
        return {
          content: [{ type: "text", text: `❌ **Error:** ${error.message}` }],
        };
      }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure but offers minimal information. It states the action (checkout) but doesn't describe what the tool actually does (e.g., creates a working copy, downloads files, requires authentication, handles errors, or returns output). This leaves significant gaps in understanding the tool's behavior.

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 unnecessary words. It is appropriately sized and front-loaded, making it easy to understand at a glance.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (6 parameters, no output schema, and no annotations), the description is insufficient. It doesn't explain what the tool returns, error conditions, authentication needs, or how it interacts with the filesystem. For a tool that performs a significant filesystem operation like checkout, more context is needed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, with all 6 parameters well-documented in the schema itself. The description adds no additional parameter information beyond what's in the schema, so it meets the baseline of 3 for adequate coverage when the schema does the heavy lifting.

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 'Hacer checkout de un repositorio SVN' clearly states the action (checkout) and resource (SVN repository) in Spanish. It distinguishes this tool from siblings like svn_commit or svn_update by specifying the checkout operation, though it doesn't explicitly contrast with similar tools like svn_update that also retrieve files.

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 prerequisites (e.g., needing an SVN repository URL), when not to use it (e.g., for updating existing checkouts), or refer to sibling tools like svn_update for different scenarios.

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