Skip to main content
Glama
DrBalls

n8n MCP Server

by DrBalls

Push to Source Control

n8n_source_control_push

Push workflow changes to a Git repository for version control and collaboration in n8n automation projects.

Instructions

Push changes to the remote Git repository.

Args:

  • force (boolean): Force push (default: false)

  • message (string, optional): Commit message

Returns: Push result with affected files.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
forceNoForce push
messageNoCommit message

Implementation Reference

  • Implementation of the n8n_source_control_push tool handler. It performs a POST request to the n8n API's /source-control/push endpoint and formats the response for the user.
      // ============ Push to Source Control ============
      server.registerTool(
        'n8n_source_control_push',
        {
          title: 'Push to Source Control',
          description: `Push changes to the remote Git repository.
    
    Args:
      - force (boolean): Force push (default: false)
      - message (string, optional): Commit message
    
    Returns:
      Push result with affected files.`,
          inputSchema: SourceControlPushSchema,
          annotations: {
            readOnlyHint: false,
            destructiveHint: false,
            idempotentHint: false,
            openWorldHint: true
          }
        },
        async (params: z.infer<typeof SourceControlPushSchema>) => {
          const result = await post<N8nSourceControlPushResult>('/source-control/push', params);
          
          const files = result.pushResult?.files || [];
          const text = [
            `**Push Complete**`,
            `- Status: ${result.statusCode}`,
            result.pushResult?.branch ? `- Branch: ${result.pushResult.branch}` : '',
            files.length ? `- Files Pushed:\n${files.map(f => `  - ${f}`).join('\n')}` : '- No files changed'
          ].filter(Boolean).join('\n');
          
          return {
            content: [{ type: 'text', text }],
            structuredContent: result
          };
        }
      );
Behavior3/5

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

Annotations already indicate this is a non-readOnly, non-destructive, non-idempotent operation with openWorldHint. The description adds minimal behavioral context beyond this - it mentions 'affected files' in returns but doesn't explain what happens during a push, potential side effects, or error conditions. No contradiction with annotations exists.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is efficiently structured with clear sections (description, Args, Returns). However, the 'Args' and 'Returns' sections could be more integrated with the main description rather than appearing as separate bullet points. The core description is a single clear sentence.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a Git push operation with 2 parameters and no output schema, the description provides basic functionality but lacks important context. It doesn't explain what 'changes' means in this context, what happens if there are no changes to push, authentication requirements, or error scenarios. The annotations help but don't fully compensate.

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?

With 100% schema description coverage, the schema already fully documents both parameters. The description's 'Args' section merely repeats what's in the schema without adding meaningful context about when to use force push or what constitutes a good commit message. Baseline 3 is appropriate when schema does all the work.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Push changes') and target resource ('remote Git repository'), distinguishing it from sibling tools like n8n_source_control_pull and n8n_source_control_status. It uses precise Git terminology that indicates its unique function within the source control toolset.

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?

No guidance is provided about when to use this tool versus alternatives. While the description implies it's for pushing changes, it doesn't specify prerequisites (e.g., whether changes need to be staged/committed first), when force push is appropriate, or how it relates to the pull/status/disconnect siblings in the workflow.

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

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