Skip to main content
Glama
DrBalls

n8n MCP Server

by DrBalls

Run n8n Workflow

n8n_run_workflow

Execute a specific n8n workflow manually by providing its ID and optional input data to trigger automation processes.

Instructions

Execute a workflow manually with optional input data.

Args:

  • id (string): Workflow ID to run

  • data (object, optional): Input data to pass to the workflow's first node

Returns: Execution result with:

  • executionId: ID of this execution

  • status: Current status

  • data: Output data from the workflow

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesWorkflow ID to run
dataNoInput data to pass to the workflow

Implementation Reference

  • The handler function for n8n_run_workflow that executes the workflow via a POST request.
    async (params: z.infer<typeof RunWorkflowSchema>) => {
      const body = params.data ? { data: params.data } : undefined;
      const execution = await post<N8nExecution>(`/workflows/${params.id}/run`, body);
      
      const text = `🚀 Workflow execution started!\n\n- Execution ID: ${execution.id}\n- Status: ${execution.status}\n- Started: ${execution.startedAt}`;
      
      return {
        content: [{ type: 'text', text }],
        structuredContent: execution
      };
  • Registration of the n8n_run_workflow tool.
      server.registerTool(
        'n8n_run_workflow',
        {
          title: 'Run n8n Workflow',
          description: `Execute a workflow manually with optional input data.
    
    Args:
      - id (string): Workflow ID to run
      - data (object, optional): Input data to pass to the workflow's first node
    
    Returns:
      Execution result with:
      - executionId: ID of this execution
      - status: Current status
      - data: Output data from the workflow`,
          inputSchema: RunWorkflowSchema,
          annotations: {
            readOnlyHint: false,
            destructiveHint: false,
            idempotentHint: false,
            openWorldHint: true
          }
        },
  • Schema definition for the n8n_run_workflow input parameters.
    export const RunWorkflowSchema = z.object({
      id: z.string().min(1)
        .describe('Workflow ID to run'),
      data: z.record(z.unknown()).optional()
        .describe('Input data to pass to the workflow')
    }).strict();
Behavior3/5

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

Annotations provide readOnlyHint=false (indicating mutation), openWorldHint=true (flexible inputs), idempotentHint=false (non-repeatable), and destructiveHint=false (safe). The description adds that this is a 'manual' execution and describes the return structure, which is useful since there's no output schema. However, it doesn't disclose behavioral aspects like execution timeouts, rate limits, authentication requirements, or what happens if the workflow fails.

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 front-loaded with the core purpose in the first sentence, followed by structured 'Args' and 'Returns' sections. It avoids redundancy, though the 'Args' section partially repeats schema information. The structure is clear but could be more streamlined by integrating parameter details more naturally.

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

Completeness3/5

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

Given the tool's complexity (execution with input/output), annotations cover safety and idempotency, but there's no output schema. The description compensates by detailing return values, which is helpful. However, it lacks context on error handling, execution states beyond 'status,' and how this interacts with sibling tools like workflow activation or execution management.

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%, with both parameters ('id' and 'data') well-documented in the schema itself. The description adds that 'data' is 'optional' and passes to 'the workflow's first node,' providing slight additional context about how input flows. This meets the baseline for high schema coverage without significant value addition.

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 'Execute a workflow manually with optional input data' which specifies the verb (execute/run) and resource (workflow). It distinguishes from siblings like 'activate_workflow' or 'get_workflow' by focusing on immediate execution rather than state changes or retrieval. However, it doesn't explicitly contrast with 'retry_execution' or 'stop_execution' which are also execution-related.

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

Usage Guidelines3/5

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

The description implies usage through 'manually' and 'optional input data,' suggesting this is for ad-hoc execution rather than automated triggers. However, it doesn't provide explicit guidance on when to use this versus alternatives like 'retry_execution' (for failed runs) or 'activate_workflow' (for enabling automated execution), nor does it mention prerequisites like workflow activation status.

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

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