Skip to main content
Glama

svn_delete

Remove files or directories from version control in SVN repositories. Specify paths, add a commit message, and choose to force deletion or keep local copies.

Instructions

Eliminar archivos del control de versiones

Input Schema

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

Implementation Reference

  • The core handler function in SvnService that executes the 'svn delete' command, validates paths, constructs arguments including options like force and keep-local, runs executeSvnCommand, and returns formatted response.
    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:445-481 (registration)
    MCP server.tool registration for 'svn_delete' tool, defines input schema with Zod, and handler that calls SvnService.delete() and formats the response as markdown.
    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 for the SVN delete operation: message, force, keepLocal.
    export interface SvnDeleteOptions { message?: string; force?: boolean; keepLocal?: boolean; }

Other Tools

Related 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