Skip to main content
Glama
gcorroto

SVN MCP Server

by gcorroto

svn_delete

Remove files or directories from Subversion version control. Specify paths, add commit messages, and optionally force deletion or keep local copies.

Instructions

Eliminar archivos del control de versiones

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathsYesArchivo(s) o directorio(s) a eliminar
messageNoMensaje para eliminación directa en repositorio
forceNoForzar eliminación
keepLocalNoMantener copia local

Implementation Reference

  • Core handler function in SvnService that executes the SVN 'delete' command, validates paths, processes options like force, keepLocal, message, normalizes paths, runs executeSvnCommand, and handles errors.
    async delete(
      paths: string | string[],
      options: SvnDeleteOptions = {}
    ): 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 = ['delete'];
        
        if (options.force) {
          args.push('--force');
        }
        
        if (options.keepLocal) {
          args.push('--keep-local');
        }
        
        if (options.message) {
          args.push('--message', options.message);
        }
    
        // 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 delete files: ${error.message}`);
      }
    }
  • index.ts:444-481 (registration)
    MCP server registration of the 'svn_delete' tool, including Zod input schema validation, wrapper handler that calls SvnService.delete, formats response with execution details.
    // 10. Eliminar archivos
    server.tool(
      "svn_delete",
      "Eliminar archivos del control de versiones",
      {
        paths: z.union([z.string(), z.array(z.string())]).describe("Archivo(s) o directorio(s) a eliminar"),
        message: z.string().optional().describe("Mensaje para eliminación directa en repositorio"),
        force: z.boolean().optional().default(false).describe("Forzar eliminación"),
        keepLocal: z.boolean().optional().default(false).describe("Mantener copia local")
      },
      async (args) => {
        try {
          const options = {
            message: args.message,
            force: args.force,
            keepLocal: args.keepLocal
          };
          
          const result = await getSvnService().delete(args.paths, options);
          const pathsArray = Array.isArray(args.paths) ? args.paths : [args.paths];
          
          const deleteText = `🗑️ **Archivos Eliminados**\n\n` +
            `**Archivos:** ${pathsArray.join(', ')}\n` +
            `**Mantener Local:** ${args.keepLocal ? 'Sí' : 'No'}\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: deleteText }],
          };
        } catch (error: any) {
          return {
            content: [{ type: "text", text: `❌ **Error:** ${error.message}` }],
          };
        }
      }
    );
  • TypeScript interface defining the options structure for SVN delete operations: message, force, keepLocal.
    export interface SvnDeleteOptions {
      message?: string;
      force?: boolean;
      keepLocal?: 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. While 'Eliminar' implies a destructive operation, it doesn't specify critical details like whether this requires commit permissions, if deletions are permanent or reversible, what happens to file history, or any rate limits. For a destructive 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, clear sentence in Spanish that directly states the tool's purpose without any fluff or redundancy. It's appropriately sized and front-loaded, making it easy to understand at a glance, which is ideal for conciseness.

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 (a destructive operation with 4 parameters) and the lack of annotations and output schema, the description is incomplete. It doesn't cover behavioral aspects like safety, permissions, or output format, which are crucial for proper use. While the schema handles parameters well, the overall context for a deletion tool is insufficient.

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%, meaning all parameters are documented in the schema itself (e.g., 'paths' for files/directories to delete, 'message' for commit message, 'force' to force deletion, 'keepLocal' to keep local copies). The description adds no additional parameter semantics beyond what the schema provides, so it meets the baseline score of 3 for high coverage.

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 action ('Eliminar' meaning 'Delete') and the target ('archivos del control de versiones' meaning 'files from version control'), which is specific and unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'svn_revert' or 'svn_cleanup', which might also involve removal operations in different contexts.

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. For example, it doesn't clarify if this is for deleting files from the repository permanently versus local cleanup, or how it differs from 'svn_revert' (which undoes changes) or 'svn_cleanup' (which cleans up working copy issues). Without such context, users might misuse it.

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