Skip to main content
Glama

list-executions

Retrieve and filter workflow executions from your n8n instance to monitor performance and troubleshoot issues.

Instructions

Retrieve all executions from your instance with optional filtering.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
clientIdYes
includeDataNo
statusNo
workflowIdNo
limitNo

Implementation Reference

  • The main handler for the 'list-executions' tool within the CallToolRequestSchema handler. It retrieves the N8nClient instance and calls getExecutions method with provided parameters, returning the list of executions or an error.
    case "list-executions": {
      const { clientId, includeData, status, workflowId, limit } = args as {
        clientId: string;
        includeData?: boolean;
        status?: 'error' | 'success' | 'waiting';
        workflowId?: string;
        limit?: number;
      };
      const client = clients.get(clientId);
      if (!client) {
        return {
          content: [{
            type: "text",
            text: "Client not initialized. Please run init-n8n first.",
          }],
          isError: true
        };
      }
    
      try {
        const executions = await client.getExecutions({ includeData, status, workflowId, limit });
        return {
          content: [{
            type: "text",
            text: JSON.stringify(executions.data, null, 2),
          }]
        };
      } catch (error) {
        return {
          content: [{
            type: "text",
            text: error instanceof Error ? error.message : "Unknown error occurred",
          }],
          isError: true
        };
      }
    }
  • src/index.ts:690-707 (registration)
    Registration of the 'list-executions' tool in the ListToolsRequestSchema handler, including its name, description, and input schema.
    {
      name: "list-executions",
      description: "Retrieve all executions from your instance with optional filtering.",
      inputSchema: {
        type: "object",
        properties: {
          clientId: { type: "string" },
          includeData: { type: "boolean" },
          status: { 
            type: "string",
            enum: ["error", "success", "waiting"]
          },
          workflowId: { type: "string" },
          limit: { type: "number" }
        },
        required: ["clientId"]
      }
    },
  • The getExecutions method in N8nClient class, which constructs the API request parameters and calls makeRequest to fetch executions from the n8n API.
    async getExecutions(options: { 
      includeData?: boolean; 
      status?: 'error' | 'success' | 'waiting';
      workflowId?: string;
      limit?: number;
    } = {}): Promise<N8nExecutionList> {
      const params = new URLSearchParams();
      if (options.includeData !== undefined) params.append('includeData', String(options.includeData));
      if (options.status) params.append('status', options.status);
      if (options.workflowId) params.append('workflowId', options.workflowId);
      if (options.limit) params.append('limit', String(options.limit));
    
      return this.makeRequest<N8nExecutionList>(`/executions?${params.toString()}`);
    }
  • TypeScript interfaces defining the structure of N8nExecution and N8nExecutionList used by the list-executions tool.
    interface N8nExecution {
      id: number;
      data?: any;
      finished: boolean;
      mode: string;
      retryOf?: number;
      retrySuccessId?: number;
      startedAt: string;
      stoppedAt?: string;
      workflowId: number;
      waitTill?: string;
    }
    
    interface N8nExecutionList {
      data: N8nExecution[];
      nextCursor?: string;
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the action ('retrieve') and scope ('from your instance'), but lacks details on permissions required, pagination behavior (implied by 'limit' parameter but not explained), rate limits, or what the return format looks like. For a tool with 5 parameters and no annotation coverage, this is a significant gap in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core action ('retrieve all executions') and adds qualifying details ('from your instance with optional filtering'). There is no wasted verbiage or redundancy, making it appropriately sized for its purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (5 parameters, 1 required, no annotations, no output schema), the description is incomplete. It covers the basic purpose but lacks usage guidelines, behavioral details (e.g., pagination, permissions), and parameter explanations. For a list/retrieve tool with filtering options and no structured output, more context is needed to guide effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate but adds minimal parameter semantics. It mentions 'optional filtering' which loosely relates to parameters like 'status', 'workflowId', and 'limit', but doesn't explain their purposes, relationships, or constraints (e.g., 'clientId' is required but not mentioned). With 5 parameters undocumented in both schema and description, the description fails to adequately clarify parameter meanings.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('retrieve') and resource ('executions'), and specifies the scope ('from your instance') with optional filtering. It distinguishes from sibling tools like 'get-execution' (singular) by indicating it retrieves multiple executions, though it doesn't explicitly contrast with other list tools like 'list-projects' or 'list-workflows' beyond the resource type.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It mentions optional filtering but doesn't specify scenarios for using it over other tools like 'get-execution' (for a single execution) or how it relates to siblings like 'delete-execution'. No prerequisites, exclusions, or explicit alternatives are stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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

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