Skip to main content
Glama

n8n_get_execution

Retrieve detailed execution data including input/output information for n8n workflow analysis and debugging.

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 for the n8n_get_execution tool. It validates input, calls the N8nApiClient to fetch execution data, formats the response, and returns it as JSON.
    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 schema including name, description, and input validation schema for the n8n_get_execution tool.
    {
      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)
    Registration and dispatch logic in the MCP server that routes calls to n8n_get_execution and other execution tool handlers.
    // Execution tools
    if (name in executionToolHandlers) {
      const handler = executionToolHandlers[name as keyof typeof executionToolHandlers];
      return handler(client, args);
    }

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