n8n_get_node_info
Retrieve configuration details for n8n workflow nodes to understand their functionality and setup requirements.
Instructions
Get information about common n8n node types and their configurations.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nodeType | Yes | Node type to get info about (e.g., "webhook", "httpRequest", "code", "if", "set") |
Implementation Reference
- src/tools/documentation-tools.ts:532-595 (handler)The async handler function implementing the core logic of n8n_get_node_info tool. It takes nodeType argument, retrieves node info from COMMON_NODES, or lists all if not provided, returning formatted JSON text content.n8n_get_node_info: async ( args: Record<string, unknown> ): Promise<ToolResult> => { const nodeType = (args.nodeType as string)?.toLowerCase(); if (!nodeType) { // List all available nodes const nodeList = Object.entries(COMMON_NODES).map(([key, node]) => ({ key, type: node.type, displayName: node.displayName, description: node.description, })); return { content: [ { type: 'text' as const, text: JSON.stringify({ message: 'Available node types', nodes: nodeList, usage: 'Call n8n_get_node_info with nodeType parameter for detailed info', }, null, 2), }, ], }; } const nodeInfo = COMMON_NODES[nodeType]; if (!nodeInfo) { const availableNodes = Object.keys(COMMON_NODES).join(', '); return { content: [ { type: 'text' as const, text: JSON.stringify({ error: `Unknown node type: ${nodeType}`, availableNodes, hint: 'Use one of the available node types listed above', }, null, 2), }, ], isError: true, }; } return { content: [ { type: 'text' as const, text: JSON.stringify({ nodeType: nodeInfo.type, displayName: nodeInfo.displayName, description: nodeInfo.description, typeVersion: nodeInfo.typeVersion, defaultParameters: nodeInfo.defaultParameters, exampleConfig: nodeInfo.exampleConfig, usage: `Use this node in your workflow with type: "${nodeInfo.type}"`, }, null, 2), }, ], }; },
- The ToolDefinition object defining the tool's name, description, and inputSchema requiring a nodeType string.{ name: 'n8n_get_node_info', description: 'Get information about common n8n node types and their configurations.', inputSchema: { type: 'object', properties: { nodeType: { type: 'string', description: 'Node type to get info about (e.g., "webhook", "httpRequest", "code", "if", "set")', }, }, required: ['nodeType'], }, },
- src/server.ts:108-111 (registration)Registration and routing logic in the MCP server's handleToolCall method that checks if the tool name exists in documentationToolHandlers and invokes the corresponding handler.if (name in documentationToolHandlers) { const handler = documentationToolHandlers[name as keyof typeof documentationToolHandlers]; return handler(args); }
- Supporting data structure COMMON_NODES containing detailed information (type, displayName, description, parameters, examples) for common n8n nodes used by the handler to respond to queries.const COMMON_NODES: Record<string, { type: string; displayName: string; description: string; typeVersion: number; defaultParameters: Record<string, unknown>; exampleConfig: Record<string, unknown>; }> = { webhook: { type: 'n8n-nodes-base.webhook', displayName: 'Webhook', description: 'Starts the workflow when a webhook is called. Can receive data via HTTP requests.', typeVersion: 2, defaultParameters: { httpMethod: 'POST', path: 'webhook', responseMode: 'onReceived', responseCode: 200, }, exampleConfig: { httpMethod: 'POST', path: 'my-webhook', responseMode: 'onReceived', responseData: 'allEntries', }, }, httpRequest: { type: 'n8n-nodes-base.httpRequest', displayName: 'HTTP Request', description: 'Makes HTTP requests to fetch or send data to any URL.', typeVersion: 4, defaultParameters: { method: 'GET', url: '', authentication: 'none', }, exampleConfig: { method: 'POST', url: 'https://api.example.com/data', authentication: 'none', sendBody: true, bodyParameters: { parameters: [ { name: 'key', value: '={{ $json.value }}' } ] }, }, }, code: { type: 'n8n-nodes-base.code', displayName: 'Code', description: 'Execute custom JavaScript or Python code.', typeVersion: 2, defaultParameters: { language: 'javaScript', mode: 'runOnceForAllItems', }, exampleConfig: { language: 'javaScript', mode: 'runOnceForAllItems', jsCode: `// Process all items const results = []; for (const item of $input.all()) { results.push({ json: { ...item.json, processed: true } }); } return results;`, }, }, 'if': { type: 'n8n-nodes-base.if', displayName: 'IF', description: 'Route items based on conditions. Has two outputs: true and false.', typeVersion: 2, defaultParameters: { conditions: { options: { caseSensitive: true, leftValue: '', typeValidation: 'strict', }, conditions: [], combinator: 'and', }, }, exampleConfig: { conditions: { options: { caseSensitive: true, leftValue: '', typeValidation: 'strict', }, conditions: [ { id: 'condition-1', leftValue: '={{ $json.status }}', rightValue: 'success', operator: { type: 'string', operation: 'equals', }, }, ], combinator: 'and', }, }, }, set: { type: 'n8n-nodes-base.set', displayName: 'Set', description: 'Set or modify data fields in items.', typeVersion: 3, defaultParameters: { mode: 'manual', duplicateItem: false, assignments: { assignments: [], }, }, exampleConfig: { mode: 'manual', duplicateItem: false, assignments: { assignments: [ { id: 'assignment-1', name: 'newField', value: '={{ $json.existingField }}', type: 'string', }, ], }, }, }, scheduleTrigger: { type: 'n8n-nodes-base.scheduleTrigger', displayName: 'Schedule Trigger', description: 'Starts the workflow on a schedule (cron-like).', typeVersion: 1, defaultParameters: { rule: { interval: [{ field: 'hours', minutesInterval: 1 }], }, }, exampleConfig: { rule: { interval: [ { field: 'cronExpression', expression: '0 9 * * 1-5', // Every weekday at 9 AM }, ], }, }, }, manualTrigger: { type: 'n8n-nodes-base.manualTrigger', displayName: 'Manual Trigger', description: 'Starts the workflow manually. Used for testing.', typeVersion: 1, defaultParameters: {}, exampleConfig: {}, }, merge: { type: 'n8n-nodes-base.merge', displayName: 'Merge', description: 'Merge data from multiple inputs.', typeVersion: 3, defaultParameters: { mode: 'append', }, exampleConfig: { mode: 'combine', mergeByFields: { values: [{ field1: 'id', field2: 'id' }], }, options: {}, }, }, splitInBatches: { type: 'n8n-nodes-base.splitInBatches', displayName: 'Split In Batches', description: 'Split items into batches for processing.', typeVersion: 3, defaultParameters: { batchSize: 10, }, exampleConfig: { batchSize: 10, options: { reset: false, }, }, }, respondToWebhook: { type: 'n8n-nodes-base.respondToWebhook', displayName: 'Respond to Webhook', description: 'Send a response back to the webhook caller.', typeVersion: 1, defaultParameters: { respondWith: 'allIncomingItems', responseCode: 200, }, exampleConfig: { respondWith: 'json', responseBody: '={{ $json }}', responseCode: 200, responseHeaders: { entries: [ { name: 'Content-Type', value: 'application/json' }, ], }, }, }, };