Skip to main content
Glama
gcorroto

SVN MCP Server

by gcorroto

svn_add

Add files or directories to SVN version control to track changes and manage repository content.

Instructions

Añadir archivos al control de versiones

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathsYesArchivo(s) o directorio(s) a añadir
forceNoForzar adición
noIgnoreNoNo respetar reglas de ignore
parentsNoCrear directorios padre si es necesario
autoPropsNoAplicar auto-propiedades
noAutoPropsNoNo aplicar auto-propiedades

Implementation Reference

  • index.ts:361-400 (registration)
    MCP server.tool registration for 'svn_add', including zod input schema, description, and thin handler wrapper that calls SvnService.add() and formats response.
    server.tool(
      "svn_add",
      "Añadir archivos al control de versiones",
      {
        paths: z.union([z.string(), z.array(z.string())]).describe("Archivo(s) o directorio(s) a añadir"),
        force: z.boolean().optional().default(false).describe("Forzar adición"),
        noIgnore: z.boolean().optional().default(false).describe("No respetar reglas de ignore"),
        parents: z.boolean().optional().default(false).describe("Crear directorios padre si es necesario"),
        autoProps: z.boolean().optional().describe("Aplicar auto-propiedades"),
        noAutoProps: z.boolean().optional().describe("No aplicar auto-propiedades")
      },
      async (args) => {
        try {
          const options = {
            force: args.force,
            noIgnore: args.noIgnore,
            parents: args.parents,
            autoProps: args.autoProps,
            noAutoProps: args.noAutoProps
          };
          
          const result = await getSvnService().add(args.paths, options);
          const pathsArray = Array.isArray(args.paths) ? args.paths : [args.paths];
          
          const addText = `➕ **Archivos Añadidos**\n\n` +
            `**Archivos:** ${pathsArray.join(', ')}\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: addText }],
          };
        } catch (error: any) {
          return {
            content: [{ type: "text", text: `❌ **Error:** ${error.message}` }],
          };
        }
      }
    );
  • Core handler logic in SvnService.add() method: validates paths, builds 'svn add' command arguments based on options, executes via executeSvnCommand, and returns formatted response.
    async add(
      paths: string | string[],
      options: SvnAddOptions = {}
    ): Promise<SvnResponse<string>> {
      try {
        const pathArray = Array.isArray(paths) ? paths : [paths];
        
        // Validar todas las rutas
        for (const path of pathArray) {
          if (!validatePath(path)) {
            throw new SvnError(`Invalid path: ${path}`);
          }
        }
    
        const args = ['add'];
        
        if (options.force) {
          args.push('--force');
        }
        
        if (options.noIgnore) {
          args.push('--no-ignore');
        }
        
        if (options.autoProps) {
          args.push('--auto-props');
        }
        
        if (options.noAutoProps) {
          args.push('--no-auto-props');
        }
        
        if (options.parents) {
          args.push('--parents');
        }
    
        // Añadir rutas normalizadas
        args.push(...pathArray.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 add files: ${error.message}`);
      }
    }
  • TypeScript interface SvnAddOptions defining the options structure for the svn add operation, imported and used in SvnService.add().
    export interface SvnAddOptions {
      force?: boolean;
      noIgnore?: boolean;
      autoProps?: boolean;
      noAutoProps?: boolean;
      parents?: boolean;
    }
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. It states the action ('añadir') but doesn't explain what this entails (e.g., files become tracked, changes are staged for commit), potential side effects (e.g., file locking, repository updates), or constraints (e.g., permissions, network requirements). This is a significant gap for a mutation tool with zero annotation coverage.

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 ('Añadir archivos al control de versiones') that directly states the tool's purpose. It is front-loaded with no wasted words, making it highly concise and well-structured for quick understanding.

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 complexity (a mutation tool with 6 parameters) and lack of annotations and output schema, the description is incomplete. It doesn't cover behavioral aspects, usage context, or output expectations, leaving gaps that could hinder an agent's ability to invoke the tool correctly in a real-world scenario.

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%, meaning all parameters are documented in the schema. The description adds no additional meaning about parameters beyond what the schema provides (e.g., it doesn't clarify interactions like 'autoProps' vs 'noAutoProps'). With high schema coverage, the baseline score of 3 is appropriate as the description doesn't compensate or add value.

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 'Añadir archivos al control de versiones' clearly states the verb ('añadir') and resource ('archivos al control de versiones'), making the purpose understandable. However, it doesn't explicitly differentiate from siblings like 'svn_commit' or 'svn_update', which also involve version control operations, so it lacks sibling distinction.

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., files must be untracked), contrast with siblings (e.g., 'svn_commit' for saving changes), or specify contexts (e.g., initial file addition). This leaves the agent without usage direction.

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