Skip to main content
Glama
DrBalls

n8n MCP Server

by DrBalls

n8n_list_executions

Retrieve and filter workflow execution records to monitor automation performance and troubleshoot issues.

Instructions

List workflow executions with optional filtering.

Args:

  • workflowId (string, optional): Filter by workflow ID

  • status (string, optional): Filter by status (error, success, waiting, new, running, canceled, crashed)

  • includeData (boolean): Include full execution data (default: false)

  • projectId (string, optional): Filter by project ID

  • limit (number): Maximum results (default: 100)

  • cursor (string, optional): Pagination cursor

Returns: List of executions with id, workflowId, status, mode, timestamps.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workflowIdNoFilter by workflow ID
statusNoFilter by execution status
includeDataNoInclude full execution data
projectIdNoFilter by project ID
limitNoMaximum results to return
cursorNoPagination cursor

Implementation Reference

  • Registration and handler implementation for n8n_list_executions tool.
      // ============ List Executions ============
      server.registerTool(
        'n8n_list_executions',
        {
          title: 'List n8n Executions',
          description: `List workflow executions with optional filtering.
    
    Args:
      - workflowId (string, optional): Filter by workflow ID
      - status (string, optional): Filter by status (error, success, waiting, new, running, canceled, crashed)
      - includeData (boolean): Include full execution data (default: false)
      - projectId (string, optional): Filter by project ID
      - limit (number): Maximum results (default: 100)
      - cursor (string, optional): Pagination cursor
    
    Returns:
      List of executions with id, workflowId, status, mode, timestamps.`,
          inputSchema: ListExecutionsSchema,
          annotations: {
            readOnlyHint: true,
            destructiveHint: false,
            idempotentHint: true,
            openWorldHint: false
          }
        },
        async (params: z.infer<typeof ListExecutionsSchema>) => {
          const queryParams: Record<string, unknown> = {
            limit: params.limit,
            includeData: params.includeData
          };
          if (params.workflowId) queryParams.workflowId = params.workflowId;
          if (params.status) queryParams.status = params.status;
          if (params.projectId) queryParams.projectId = params.projectId;
          if (params.cursor) queryParams.cursor = params.cursor;
          
          const response = await get<N8nPaginatedResponse<N8nExecutionListItem>>('/executions', queryParams);
          
          const formatted = response.data.map(formatExecution).join('\n\n---\n\n');
          const output = {
            count: response.data.length,
            executions: response.data,
            nextCursor: response.nextCursor
          };
          
          let text = `Found ${response.data.length} execution(s):\n\n${formatted}`;
          if (response.nextCursor) {
            text += `\n\n_More results available. Use cursor: ${response.nextCursor}_`;
          }
          
          return {
            content: [{ type: 'text', text }],
            structuredContent: output
          };
        }
      );

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