Skip to main content
Glama

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
NameRequiredDescriptionDefault
typeYesThe 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'],
      },
    },
  • 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),
          },
        ],
      };
    }
  • 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'],
    },
  • N8nClient helper method that delegates example retrieval to node-registry.
    async getNodeTypeExamples(typeName: string): Promise<N8nNodeExample[]> {
      return getNodeExamples(typeName);
    }
  • 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] || [];
    }

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/get2knowio/n8n-mcp'

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