Skip to main content
Glama

svn_checkout

Check out SVN repositories by specifying URL, destination path, revision, depth, and options to force checkout or ignore externals.

Instructions

Hacer checkout de un repositorio SVN

Input Schema

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

Implementation Reference

  • Core handler logic for svn_checkout: builds svn checkout command arguments with options and executes via executeSvnCommand
    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:281-319 (registration)
    MCP server registration of svn_checkout tool, defining input schema with zod and thin async handler that calls SvnService.checkout
    server.tool( "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 SvnCheckoutOptions used in the checkout handler
    export interface SvnCheckoutOptions { revision?: number | 'HEAD'; depth?: 'empty' | 'files' | 'immediates' | 'infinity'; force?: boolean; ignoreExternals?: boolean; }

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