Skip to main content
Glama
gcorroto

SVN MCP Server

by gcorroto

svn_update

Update your local SVN working copy with the latest repository changes, handling conflicts and specifying target revisions as needed.

Instructions

Actualizar working copy desde el repositorio

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNoRuta específica a actualizar
revisionNoRevisión objetivo
forceNoForzar actualización
ignoreExternalsNoIgnorar externals
acceptConflictsNoComo manejar conflictos

Implementation Reference

  • The core handler function in SvnService that constructs and executes the 'svn update' command with options, validates paths, and returns the result.
    async update(
      path?: string,
      options: SvnUpdateOptions = {}
    ): Promise<SvnResponse<string>> {
      try {
        const args = ['update'];
        
        if (options.revision) {
          args.push('--revision', options.revision.toString());
        }
        
        if (options.force) {
          args.push('--force');
        }
        
        if (options.ignoreExternals) {
          args.push('--ignore-externals');
        }
        
        if (options.acceptConflicts) {
          args.push('--accept', options.acceptConflicts);
        }
        
        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 update: ${error.message}`);
      }
    }
  • index.ts:323-358 (registration)
    MCP server.tool registration for 'svn_update', including input schema with Zod validation and thin wrapper handler that calls SvnService.update and formats output.
      "svn_update",
      "Actualizar working copy desde el repositorio",
      {
        path: z.string().optional().describe("Ruta específica a actualizar"),
        revision: z.union([z.number(), z.literal("HEAD"), z.literal("BASE"), z.literal("COMMITTED"), z.literal("PREV")]).optional().describe("Revisión objetivo"),
        force: z.boolean().optional().default(false).describe("Forzar actualización"),
        ignoreExternals: z.boolean().optional().default(false).describe("Ignorar externals"),
        acceptConflicts: z.enum(["postpone", "base", "mine-conflict", "theirs-conflict", "mine-full", "theirs-full"]).optional().describe("Como manejar conflictos")
      },
      async (args) => {
        try {
          const options = {
            revision: args.revision,
            force: args.force,
            ignoreExternals: args.ignoreExternals,
            acceptConflicts: args.acceptConflicts
          };
          
          const result = await getSvnService().update(args.path, options);
          
          const updateText = `🔄 **Actualización Completada**\n\n` +
            `**Ruta:** ${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: updateText }],
          };
        } catch (error: any) {
          return {
            content: [{ type: "text", text: `❌ **Error:** ${error.message}` }],
          };
        }
      }
    );
  • TypeScript interface defining the options for the SVN update operation, used by the SvnService.update method.
    export interface SvnUpdateOptions {
      revision?: number | 'HEAD' | 'BASE' | 'COMMITTED' | 'PREV';
      force?: boolean;
      ignoreExternals?: boolean;
      acceptConflicts?: 'postpone' | 'base' | 'mine-conflict' | 'theirs-conflict' | 'mine-full' | 'theirs-full';
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. 'Actualizar working copy' implies a mutation operation that modifies local files, but the description doesn't disclose important behavioral traits: whether this overwrites local changes, requires authentication, has side effects on uncommitted work, or what happens with conflicts. The description is too minimal 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 Spanish sentence that directly states the tool's purpose without any wasted words. It's appropriately sized for a basic operation and front-loads the core functionality. Every word earns its place in this minimal description.

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?

For a mutation tool with 5 parameters, no annotations, and no output schema, the description is insufficiently complete. It doesn't address the tool's safety profile, conflict resolution behavior, or what happens to local modifications. Given the complexity of SVN update operations and the lack of structured metadata, the description should provide more contextual information about behavioral implications.

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%, so the schema already documents all 5 parameters thoroughly. The description adds no additional parameter semantics beyond what's in the schema - it doesn't explain parameter interactions, default behaviors, or practical usage examples. With complete schema coverage, the baseline score of 3 is appropriate.

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 ('Actualizar' - Update) and target ('working copy desde el repositorio' - working copy from the repository), providing a specific verb+resource combination. However, it doesn't explicitly differentiate from sibling tools like 'svn_checkout' (which also retrieves from repository) or 'svn_revert' (which also modifies working copy), missing full sibling differentiation.

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 when to choose svn_update over svn_checkout (initial retrieval) or svn_revert (undo changes), nor does it specify prerequisites like requiring an existing working copy. There's only implied usage context from the tool name itself.

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