Skip to main content
Glama
DrBalls

n8n MCP Server

by DrBalls

n8n_source_control_pull

Pull changes from a remote Git repository into n8n workflows, with options to force pull and set variables after completion.

Instructions

Pull changes from the remote Git repository.

Args:

  • force (boolean): Force pull even with local changes (default: false)

  • variables (object, optional): Variables to set after pull

Returns: Pull result with affected files.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
forceNoForce pull even with local changes
variablesNoVariables to set after pull

Implementation Reference

  • Handler implementation for the 'n8n_source_control_pull' tool, which performs an API call to /source-control/pull and formats the output.
      async (params: z.infer<typeof SourceControlPullSchema>) => {
        const result = await post<N8nSourceControlPullResult>('/source-control/pull', params);
        
        const files = result.pullResult?.files || [];
        const text = [
          `**Pull Complete**`,
          `- Status: ${result.statusCode}`,
          result.pullResult?.branch ? `- Branch: ${result.pullResult.branch}` : '',
          files.length ? `- Files Updated:\n${files.map(f => `  - ${f}`).join('\n')}` : '- No files changed'
        ].filter(Boolean).join('\n');
        
        return {
          content: [{ type: 'text', text }],
          structuredContent: result
        };
      }
    );
  • Registration of the 'n8n_source_control_pull' tool in the MCP server.
      server.registerTool(
        'n8n_source_control_pull',
        {
          title: 'Pull from Source Control',
          description: `Pull changes from the remote Git repository.
    
    Args:
      - force (boolean): Force pull even with local changes (default: false)
      - variables (object, optional): Variables to set after pull
    
    Returns:
      Pull result with affected files.`,
          inputSchema: SourceControlPullSchema,
          annotations: {
            readOnlyHint: false,
            destructiveHint: false,
            idempotentHint: false,
            openWorldHint: true
          }
        },

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/DrBalls/n8n-mcp-server-v2'

If you have feedback or need assistance with the MCP directory API, please join our Discord server