Skip to main content
Glama
nikolausm

n8n MCP Server

by nikolausm

execute_workflow

Runs an n8n workflow by its ID with optional input data to trigger automation processes.

Instructions

Execute a workflow with optional input data

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workflowIdYesThe ID of the workflow to execute
dataNoInput data for the workflow execution

Implementation Reference

  • Handler case for execute_workflow tool: parses input using ExecuteWorkflowSchema then delegates to client.executeWorkflow()
    case "execute_workflow": {
      const { workflowId, data } = ExecuteWorkflowSchema.parse(args);
      return await client.executeWorkflow(workflowId, data);
    }
  • Zod schema definition for execute_workflow input validation: requires workflowId (string), optional data (record of any)
    const ExecuteWorkflowSchema = z.object({
      workflowId: z.string(),
      data: z.record(z.any()).optional(),
    });
  • src/tools.ts:163-180 (registration)
    Tool registration definition: declares execute_workflow with description and inputSchema for MCP protocol
    {
      name: "execute_workflow",
      description: "Execute a workflow with optional input data",
      inputSchema: {
        type: "object",
        properties: {
          workflowId: {
            type: "string",
            description: "The ID of the workflow to execute",
          },
          data: {
            type: "object",
            description: "Input data for the workflow execution",
          },
        },
        required: ["workflowId"],
      },
    },
  • N8nClient.executeWorkflow method: makes POST request to /api/v1/workflows/{id}/execute with optional data payload
    async executeWorkflow(id: string, data?: any) {
      const response = await this.client.post(`/api/v1/workflows/${id}/execute`, {
        data,
      });
      return response.data;
    }
Behavior2/5

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

No annotations are provided, so the description must fully disclose behavior. It only states 'Execute' but does not reveal side effects, required permissions, or what happens if the workflow is inactive or already running.

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

Conciseness4/5

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

The description is a single short sentence with the verb and resource front-loaded. It is concise but could be more informative without losing brevity.

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 lack of annotations and output schema, the description should provide more context about return values, errors, and usage constraints. It is insufficient for an agent to fully understand the tool's behavior.

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 description coverage is 100%, so the schema already describes both parameters. The description adds minimal extra value by reiterating that input data is optional, which is implied by the schema (data not required).

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

Purpose5/5

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

The description clearly states the action ('execute') and the resource ('workflow'), and notes that input data is optional. It distinguishes from sibling tools like 'activate_workflow' and 'create_workflow'.

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 retry_execution or activate_workflow. No prerequisites or context are mentioned.

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