Skip to main content
Glama

get-execution

Retrieve detailed execution data by ID from the N8N MCP server for specific workflow tracking and analysis.

Instructions

Retrieve a specific execution by ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
clientIdYes
idYes
includeDataNo

Implementation Reference

  • The main handler function for the 'get-execution' tool within the CallToolRequestSchema handler. It retrieves the N8nClient instance using the provided clientId, calls the client's getExecution method with the execution id and optional includeData flag, and returns the execution details 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 definition for the 'get-execution' tool, specifying required clientId and id (number), and optional includeData boolean.
    inputSchema: {
      type: "object",
      properties: {
        clientId: { type: "string" },
        id: { type: "number" },
        includeData: { type: "boolean" }
      },
      required: ["clientId", "id"]
    }
  • src/index.ts:708-720 (registration)
    Tool registration entry in the listTools response, defining the name, description, and input schema for 'get-execution'.
    {
      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"]
      }
    },
  • Helper method in N8nClient class that performs the HTTP request to n8n's /executions/{id} endpoint, optionally appending includeData query parameter, using the shared makeRequest utility.
    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()}`);
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states 'retrieve' which implies a read operation, but doesn't cover permissions, rate limits, error handling, or response format. For a tool with 3 parameters and no output schema, this is insufficient behavioral context.

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 with no wasted words. It's front-loaded with the core action and resource, making it easy to parse quickly. Every word earns its place in conveying the basic 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 (3 parameters, no annotations, no output schema), the description is incomplete. It doesn't explain the execution resource, what data is retrieved, or how parameters interact. For a retrieval tool in a workflow/execution system, more context is needed to use it effectively.

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 no parameter information. It doesn't explain what 'clientId', 'id', or 'includeData' mean, their formats, or how they affect the retrieval. This leaves all 3 parameters undocumented beyond their schema types.

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 the resource 'execution by ID', making the purpose understandable. However, it doesn't differentiate from sibling tools like 'list-executions' or 'get-workflow', which also retrieve execution-related data, so it misses full sibling distinction.

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 such as 'list-executions' or 'get-workflow'. It lacks context on prerequisites, exclusions, or specific use cases, leaving the agent to infer usage from the name alone.

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

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

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