Skip to main content
Glama

get-execution

Retrieve a specific n8n workflow execution by ID to access its details and data for analysis or troubleshooting.

Instructions

Retrieve a specific execution by ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
clientIdYes
idYes
includeDataNo

Implementation Reference

  • Handler for the 'get-execution' tool. Retrieves the N8nClient instance using clientId, calls getExecution on it with the provided id and optional includeData, and returns the execution data as JSON or an error.
    case "get-execution": {
      const { clientId, id, includeData } = args as { clientId: string; id: number; includeData?: boolean };
      const client = clients.get(clientId);
      if (!client) {
        return {
          content: [{
            type: "text",
            text: "Client not initialized. Please run init-n8n first.",
          }],
          isError: true
        };
      }
    
      try {
        const execution = await client.getExecution(id, includeData);
        return {
          content: [{
            type: "text",
            text: JSON.stringify(execution, null, 2),
          }]
        };
      } catch (error) {
        return {
          content: [{
            type: "text",
            text: error instanceof Error ? error.message : "Unknown error occurred",
          }],
          isError: true
        };
      }
    }
  • Input schema and registration of the 'get-execution' tool in the listTools response, defining parameters: clientId (string, required), id (number, required), includeData (boolean, optional).
    {
      name: "get-execution",
      description: "Retrieve a specific execution by ID.",
      inputSchema: {
        type: "object",
        properties: {
          clientId: { type: "string" },
          id: { type: "number" },
          includeData: { type: "boolean" }
        },
        required: ["clientId", "id"]
      }
    },
  • N8nClient method that implements the core logic: makes an API request to `/executions/${id}` with optional includeData parameter to fetch the execution details from n8n.
    async getExecution(id: number, includeData: boolean = false): Promise<N8nExecution> {
      const params = new URLSearchParams();
      if (includeData) params.append('includeData', 'true');
    
      return this.makeRequest<N8nExecution>(`/executions/${id}?${params.toString()}`);
    }
  • TypeScript interface defining the structure of an N8nExecution object returned by the getExecution method.
    interface N8nExecution {
      id: number;
      data?: any;
      finished: boolean;
      mode: string;
      retryOf?: number;
      retrySuccessId?: number;
      startedAt: string;
      stoppedAt?: string;
      workflowId: number;
      waitTill?: 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 mentions 'retrieve', implying a read operation, but does not address permissions, rate limits, error handling, or response format. This is inadequate for a tool with no annotation coverage, as critical behavioral traits are missing.

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, clear sentence with no wasted words, making it highly concise and front-loaded. It efficiently communicates the core action without unnecessary elaboration, earning full marks for brevity and structure.

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 (3 parameters, no annotations, no output schema), the description is incomplete. It lacks details on parameter meanings, behavioral traits, and output expectations, failing to provide sufficient context for effective tool use. This is particularly problematic as it does not compensate for the absence of structured data.

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 for undocumented parameters. It only mentions 'ID' without explaining 'clientId' or 'includeData', leaving two of the three parameters (clientId and includeData) without semantic context. This fails to add meaningful information beyond the schema.

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

Purpose3/5

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

The description states the verb 'retrieve' and resource 'execution by ID', which clarifies the basic purpose. However, it lacks specificity about what an 'execution' entails (e.g., workflow execution, process run) and does not differentiate from sibling tools like 'list-executions' or 'get-workflow', making it vague in context.

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?

No guidance is provided on when to use this tool versus alternatives such as 'list-executions' or 'get-workflow'. The description implies usage for retrieving a specific execution by ID but offers no context on prerequisites, exclusions, or related tools, leaving the agent without clear direction.

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