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
| Name | Required | Description | Default |
|---|---|---|---|
| force | No | Force pull even with local changes | |
| variables | No | Variables to set after pull |
Implementation Reference
- src/tools/users-sourcecontrol.ts:211-227 (handler)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 }; } ); - src/tools/users-sourcecontrol.ts:191-210 (registration)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 } },