Skip to main content
Glama

examples

Retrieve workflow examples for specific n8n node types to understand implementation patterns and accelerate 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)
    Tool registration including name, description, and input schema requiring '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'], }, },
  • Main handler for 'examples' tool: fetches examples from n8nClient, returns JSON success response or NOT_FOUND error.
    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), }, ], }; }
  • Dispatch case in main CallToolRequestSchema handler that routes to handleGetExamples.
    case 'examples': return await this.handleGetExamples(request.params.arguments as { type: string });
  • N8nClient method delegating to node-registry getNodeExamples.
    async getNodeTypeExamples(typeName: string): Promise<N8nNodeExample[]> { return getNodeExamples(typeName); }
  • Core function returning examples from NODE_EXAMPLES record for the given type.
    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