Skip to main content
Glama

n8n_get_execution

Retrieve detailed information about a specific n8n workflow execution, including input and output data, to analyze performance and troubleshoot issues.

Instructions

Get detailed information about a specific execution including input/output data.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe execution ID
includeDataNoInclude full execution data (default: true)

Implementation Reference

  • The main handler function that executes the tool logic: validates input, fetches execution data from N8n API client, formats response, handles errors.
    n8n_get_execution: async ( client: N8nApiClient, args: Record<string, unknown> ): Promise<ToolResult> => { const id = args.id as string; if (!id) { throw new Error('Execution ID is required'); } const includeData = args.includeData !== false; // default true const execution = await client.getExecution(id, includeData); const response: Record<string, unknown> = { id: execution.id, workflowId: execution.workflowId, status: execution.status, mode: execution.mode, startedAt: execution.startedAt, stoppedAt: execution.stoppedAt, finished: execution.finished, }; if (includeData && execution.data) { response.data = execution.data; } if (execution.data?.resultData?.error) { response.error = execution.data.resultData.error; } return { content: [ { type: 'text' as const, text: JSON.stringify(response, null, 2), }, ], }; },
  • Tool definition including name, description, input schema with required 'id' parameter and optional 'includeData'.
    { name: 'n8n_get_execution', description: 'Get detailed information about a specific execution including input/output data.', inputSchema: { type: 'object', properties: { id: { type: 'string', description: 'The execution ID', }, includeData: { type: 'boolean', description: 'Include full execution data (default: true)', }, }, required: ['id'], }, },
  • src/server.ts:127-131 (registration)
    Server-side dispatch logic that registers and routes calls to the n8n_get_execution handler (and other execution tools) based on tool name.
    // Execution tools if (name in executionToolHandlers) { const handler = executionToolHandlers[name as keyof typeof executionToolHandlers]; return handler(client, args); }
  • Aggregation of all tool definitions including n8n_get_execution schema into the central allTools array used for MCP tool listing.
    export const allTools: ToolDefinition[] = [ ...documentationTools, // Documentation first for discoverability ...workflowTools, ...executionTools, ];

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/alicankiraz1/cursor-n8n-builder'

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