Skip to main content
Glama
nikolausm

n8n MCP Server

by nikolausm

get_execution

Retrieves detailed information about a specific workflow execution using its ID.

Instructions

Get details of a specific execution

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
executionIdYesThe ID of the execution

Implementation Reference

  • Handler case for 'get_execution' tool: parses the executionId from args using ExecutionIdSchema, then calls client.getExecution(executionId).
    case "get_execution": {
      const { executionId } = ExecutionIdSchema.parse(args);
      return await client.getExecution(executionId);
  • Zod schema for get_execution input validation: expects a string 'executionId'.
    const ExecutionIdSchema = z.object({
      executionId: z.string(),
    });
  • src/tools.ts:207-220 (registration)
    Tool registration metadata for 'get_execution': describes getting details of a specific execution, requires executionId string input.
    {
      name: "get_execution",
      description: "Get details of a specific execution",
      inputSchema: {
        type: "object",
        properties: {
          executionId: {
            type: "string",
            description: "The ID of the execution",
          },
        },
        required: ["executionId"],
      },
    },
  • Client method getExecution(id): makes GET request to /api/v1/executions/{id} and validates the response with ExecutionSchema.
    async getExecution(id: string) {
      const response = await this.client.get(`/api/v1/executions/${id}`);
      return ExecutionSchema.parse(response.data);
    }
  • src/index.ts:37-74 (registration)
    Main server entry point: routes incoming tool call requests to handleToolCall(name, args, n8nClient) which dispatches to the correct handler case.
    server.setRequestHandler(CallToolRequestSchema, async (request) => {
      try {
        const { name, arguments: args } = request.params;
        const result = await handleToolCall(name, args, n8nClient);
        return {
          content: [
            {
              type: "text",
              text: typeof result === "string" ? result : JSON.stringify(result, null, 2),
            },
          ],
        };
      } catch (error) {
        const errorMessage = error instanceof Error ? error.message : "Unknown error occurred";
        return {
          content: [
            {
              type: "text",
              text: `Error: ${errorMessage}`,
            },
          ],
        };
      }
    });
    
    // Start server
    async function main() {
      const transport = new StdioServerTransport();
      await server.connect(transport);
      console.error("n8n MCP server running on stdio");
      console.error(`Connected to n8n at: ${process.env.N8N_URL || "http://localhost:5678"}`);
    }
    
    main().catch((error) => {
      console.error("Fatal error:", error);
      process.exit(1);
    });
Behavior2/5

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

No annotations provided. The description only states 'get details', implying a read operation but omits any behavioral traits like permissions, response structure, or potential side effects.

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

Conciseness3/5

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

Single sentence is concise but undermines completeness. It could benefit from additional context without becoming verbose.

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?

Despite a simple signature, the description lacks details on what 'details' entails and does not mention return values or typical usage, leaving gaps for an agent.

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

Parameters3/5

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

Schema coverage is 100% with 'executionId' described. Description adds no extra meaning beyond the schema, so baseline score applies.

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 'Get details of a specific execution' clearly states the action (get) and resource (execution details). It distinguishes from sibling 'get_executions' which retrieves multiple executions.

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 on when to use this tool versus alternatives like 'get_executions' or 'retry_execution'. The description lacks context for usage decisions.

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

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