examples
Retrieve example configurations for n8n workflow nodes to understand implementation patterns and accelerate workflow development.
Instructions
Get examples for a specific n8n node type
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | Yes | The node type name (e.g., n8n-nodes-base.webhook) |
Implementation Reference
- src/index.ts:124-137 (registration)Registration of the 'examples' MCP tool, including name, description, and input schema requiring a 'type' parameter.
{ name: 'examples', description: 'Get examples for a specific n8n node type', inputSchema: { type: 'object', properties: { type: { type: 'string', description: 'The node type name (e.g., n8n-nodes-base.webhook)', }, }, required: ['type'], }, }, - src/index.ts:680-701 (handler)Primary handler function for the 'examples' tool. Fetches examples via N8nClient and returns JSON-formatted success or error response.
private async handleGetExamples(args: { type: string }) { const examples = await this.n8nClient.getNodeTypeExamples(args.type); if (examples.length === 0) { return { content: [ { type: 'text', text: JSON.stringify(jsonError(`No examples available for node type '${args.type}'.`, 'NOT_FOUND'), null, 2), }, ], }; } return { content: [ { type: 'text', text: JSON.stringify(jsonSuccess(examples), null, 2), }, ], }; } - src/index.ts:127-136 (schema)Input schema for the 'examples' tool, defining a required 'type' string parameter.
inputSchema: { type: 'object', properties: { type: { type: 'string', description: 'The node type name (e.g., n8n-nodes-base.webhook)', }, }, required: ['type'], }, - src/n8n-client.ts:296-298 (helper)N8nClient helper method that delegates example retrieval to node-registry.
async getNodeTypeExamples(typeName: string): Promise<N8nNodeExample[]> { return getNodeExamples(typeName); } - src/node-registry.ts:400-402 (helper)Core helper function that returns node examples from the NODE_EXAMPLES registry by type name.
export function getNodeExamples(typeName: string): N8nNodeExample[] { return NODE_EXAMPLES[typeName] || []; }