Skip to main content
Glama

n8n_activate_workflow

Idempotent

Activate a workflow to begin listening for triggers like webhooks or schedules, enabling automatic execution when conditions are met.

Instructions

Start a workflow to listen for triggers (webhooks, schedules, etc). Activating enables automatic execution when trigger conditions are met. Workflow must have valid trigger nodes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesWorkflow ID to activate

Implementation Reference

  • Handler method that activates a workflow by making a POST request to the n8n API endpoint /workflows/{id}/activate
    async activateWorkflow(id: string) {
      return this.request(`${this.apiBase}/workflows/${id}/activate`, {
        method: 'POST',
      });
    }
  • Tool schema definition with name, description, input parameters (workflow ID), and behavioral annotations
      name: 'n8n_activate_workflow',
      description: 'Start a workflow to listen for triggers (webhooks, schedules, etc). Activating enables automatic execution when trigger conditions are met. Workflow must have valid trigger nodes.',
      inputSchema: {
        type: 'object',
        properties: {
          id: { type: 'string', description: 'Workflow ID to activate' },
        },
        required: ['id'],
      },
      annotations: {
        title: 'Activate Workflow',
        readOnlyHint: false,
        destructiveHint: false,
        idempotentHint: true,
        openWorldHint: true,
      },
    },
  • src/server.ts:35-36 (registration)
    Tool registration in the request handler switch statement that routes the tool call to the activateWorkflow client method
    case 'n8n_activate_workflow':
      return client.activateWorkflow(args.id);
  • Private helper method that handles authenticated HTTP requests to the n8n API with error handling and timeout support
    private async request<T>(
      endpoint: string,
      options: RequestInit = {}
    ): Promise<T> {
      const url = `${this.config.apiUrl}${endpoint}`;
    
      const response = await fetch(url, {
        ...options,
        signal: AbortSignal.timeout(this.timeout),
        headers: {
          'X-N8N-API-KEY': this.config.apiKey,
          'Content-Type': 'application/json',
          ...options.headers,
        },
      });
    
      if (!response.ok) {
        const error = await response.text();
        throw new Error(`n8n API Error (${response.status}): ${error}`);
      }
    
      return response.json() as Promise<T>;
    }
Behavior4/5

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

Annotations indicate this is a non-read-only, non-destructive, idempotent operation with open-world data. The description adds valuable context beyond annotations: it explains that activation enables automatic execution for triggers, specifies the requirement for valid trigger nodes, and clarifies the purpose as 'listening' for triggers. No contradiction with annotations, as 'start' aligns with non-read-only and non-destructive hints.

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 concise and front-loaded, consisting of two sentences that directly explain the tool's purpose and prerequisites without unnecessary details. Every sentence adds value, making it efficient and easy to understand.

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

Completeness4/5

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

Given the tool's moderate complexity (activating workflows with triggers), rich annotations (covering safety and idempotency), and no output schema, the description is fairly complete. It covers the action, purpose, and prerequisites, but could benefit from mentioning potential side effects like resource usage or error conditions, though annotations help mitigate this gap.

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?

The input schema has 100% description coverage, with the 'id' parameter fully documented. The description doesn't add any parameter-specific details beyond the schema, such as format examples or constraints. With high schema coverage, the baseline score of 3 is appropriate, as the description doesn't compensate but doesn't need to.

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 action ('Start a workflow to listen for triggers') and resource ('workflow'), specifying it enables automatic execution when triggers are met. However, it doesn't explicitly differentiate from sibling tools like 'n8n_execute_workflow' (which likely runs a workflow immediately) or 'n8n_deactivate_workflow' (the inverse operation), missing 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 Guidelines4/5

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

The description provides clear context on when to use it: when you want to enable automatic execution based on triggers like webhooks or schedules, and it mentions the prerequisite that 'Workflow must have valid trigger nodes.' It doesn't explicitly state when not to use it or name alternatives, such as using 'n8n_execute_workflow' for one-time runs.

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/node2flow-th/n8n-management-mcp-community'

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