Skip to main content
Glama
gcorroto

SVN MCP Server

by gcorroto

svn_commit

Commit changes to an SVN repository with customizable options for message, files, locks, and force operations.

Instructions

Confirmar cambios al repositorio

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
messageYesMensaje del commit
pathsNoArchivos específicos a confirmar
fileNoArchivo con mensaje de commit
forceNoForzar commit
keepLocksNoMantener locks después del commit
noUnlockNoNo desbloquear archivos

Implementation Reference

  • The core handler function that implements the svn_commit tool logic by constructing and executing the 'svn commit' command with options and paths.
    /**
     * Confirmar cambios al repositorio
     */
    async commit(
      options: SvnCommitOptions,
      paths?: string[]
    ): Promise<SvnResponse<string>> {
      try {
        if (!options.message && !options.file) {
          throw new SvnError('Commit message is required');
        }
    
        const args = ['commit'];
        
        if (options.message) {
          args.push('--message', options.message);
        }
        
        if (options.file) {
          args.push('--file', normalizePath(options.file));
        }
        
        if (options.force) {
          args.push('--force');
        }
        
        if (options.keepLocks) {
          args.push('--keep-locks');
        }
        
        if (options.noUnlock) {
          args.push('--no-unlock');
        }
    
        // Añadir rutas específicas si se proporcionan
        if (paths && paths.length > 0) {
          for (const path of paths) {
            if (!validatePath(path)) {
              throw new SvnError(`Invalid path: ${path}`);
            }
          }
          args.push(...paths.map(p => normalizePath(p)));
        } else if (options.targets) {
          args.push(...options.targets.map(p => normalizePath(p)));
        }
    
        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 commit: ${error.message}`);
      }
    }
  • TypeScript interface defining the input options for the svn_commit tool, used by the handler.
    export interface SvnCommitOptions {
      message: string;
      file?: string;
      force?: boolean;
      keepLocks?: boolean;
      noUnlock?: boolean;
      targets?: string[];
    }
  • index.ts:402-442 (registration)
    MCP server.tool registration for 'svn_commit', including Zod input schema and handler wrapper that delegates to SvnService.commit.
    // 9. Commit de cambios
    server.tool(
      "svn_commit",
      "Confirmar cambios al repositorio",
      {
        message: z.string().describe("Mensaje del commit"),
        paths: z.array(z.string()).optional().describe("Archivos específicos a confirmar"),
        file: z.string().optional().describe("Archivo con mensaje de commit"),
        force: z.boolean().optional().default(false).describe("Forzar commit"),
        keepLocks: z.boolean().optional().default(false).describe("Mantener locks después del commit"),
        noUnlock: z.boolean().optional().default(false).describe("No desbloquear archivos")
      },
      async (args) => {
        try {
          const options = {
            message: args.message,
            file: args.file,
            force: args.force,
            keepLocks: args.keepLocks,
            noUnlock: args.noUnlock
          };
          
          const result = await getSvnService().commit(options, args.paths);
          
          const commitText = `✅ **Commit Realizado**\n\n` +
            `**Mensaje:** ${args.message}\n` +
            `**Archivos:** ${args.paths?.join(', ') || 'Todos los cambios'}\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: commitText }],
          };
        } 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. It states the action ('confirmar cambios') but doesn't reveal critical traits: whether this is a destructive operation (likely yes, as commits are permanent), authentication requirements, rate limits, or what happens on success/failure (e.g., returns a commit hash). For a mutation tool with zero annotation coverage, this is a significant gap in transparency.

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 phrase ('Confirmar cambios al repositorio') that front-loads the core purpose without unnecessary words. It's appropriately sized for a tool with a clear primary function, and every part of the sentence earns its place by specifying the action and target.

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, mutation operation) and lack of annotations and output schema, the description is incomplete. It doesn't address behavioral aspects (e.g., destructiveness, auth needs), output expectations, or error handling. For a commit tool in a version control context, this leaves critical gaps for an AI agent to use it effectively.

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?

Schema description coverage is 100%, with all parameters well-documented in the schema (e.g., 'message' as commit message, 'paths' as specific files). The description adds no parameter semantics beyond what the schema provides—it doesn't explain parameter interactions (e.g., 'message' vs. 'file') or usage nuances. Baseline 3 is appropriate since the schema does the heavy lifting, but the description doesn't compensate with extra context.

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 'Confirmar cambios al repositorio' clearly states the verb ('confirmar') and resource ('repositorio'), translating to 'commit changes to the repository' in English. It distinguishes from siblings like svn_add or svn_revert by focusing on committing rather than adding or reverting changes. However, it doesn't explicitly differentiate from all siblings (e.g., svn_update also modifies the repository), so it's not a perfect 5.

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 staged changes), exclusions (e.g., not for uncommitted files), or comparisons to siblings like svn_add (for adding files) or svn_revert (for undoing changes). This leaves the agent with minimal context for tool selection.

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