Skip to main content
Glama
DrBalls

n8n MCP Server

by DrBalls

n8n_get_execution

Retrieve detailed execution information including status, timestamps, workflow data, and node outputs using an execution ID.

Instructions

Get detailed information about a specific execution.

Args:

  • id (string): Execution ID

  • includeData (boolean): Include full execution data with node outputs (default: true)

Returns: Complete execution details including:

  • Status and mode

  • Timestamps (started, stopped)

  • Workflow data

  • Node execution results (if includeData is true)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesExecution ID
includeDataNoInclude full execution data

Implementation Reference

  • The tool 'n8n_get_execution' is registered and implemented here. It retrieves detailed execution information from the n8n API using the provided execution ID and includeData flag.
      server.registerTool(
        'n8n_get_execution',
        {
          title: 'Get n8n Execution',
          description: `Get detailed information about a specific execution.
    
    Args:
      - id (string): Execution ID
      - includeData (boolean): Include full execution data with node outputs (default: true)
    
    Returns:
      Complete execution details including:
      - Status and mode
      - Timestamps (started, stopped)
      - Workflow data
      - Node execution results (if includeData is true)`,
          inputSchema: GetExecutionSchema,
          annotations: {
            readOnlyHint: true,
            destructiveHint: false,
            idempotentHint: true,
            openWorldHint: false
          }
        },
        async (params: z.infer<typeof GetExecutionSchema>) => {
          const execution = await get<N8nExecution>(`/executions/${params.id}`, {
            includeData: params.includeData
          });
          
          let text = formatExecution(execution);
          
          if (execution.data?.resultData?.error) {
            text += `\n\n**Error:**\n\`\`\`\n${JSON.stringify(execution.data.resultData.error, null, 2)}\n\`\`\``;
          }
          
          if (execution.data?.resultData?.lastNodeExecuted) {
            text += `\n\n- Last Node: ${execution.data.resultData.lastNodeExecuted}`;
          }
          
          return {
            content: [{ type: 'text', text }],
            structuredContent: execution
          };
        }

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/DrBalls/n8n-mcp-server-v2'

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