Skip to main content
Glama

activate-workflow

Trigger workflow execution on the MCP-N8N server by providing a workflow ID and client ID. Input must be in compact, single-line JSON format.

Instructions

Activate a workflow by ID. This will enable the workflow to run. IMPORTANT: Arguments must be provided as compact, single-line JSON without whitespace or newlines.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
clientIdYes
idYes

Implementation Reference

  • MCP server tool handler for 'activate-workflow': validates client, calls N8nClient.activateWorkflow(id), formats and returns response or error.
    case "activate-workflow": {
      const { clientId, id } = args as { clientId: string; id: string };
      const client = clients.get(clientId);
      if (!client) {
        return {
          content: [{
            type: "text",
            text: "Client not initialized. Please run init-n8n first.",
          }],
          isError: true
        };
      }
    
      try {
        const workflow = await client.activateWorkflow(id);
        return {
          content: [{
            type: "text",
            text: `Successfully activated workflow:\n${JSON.stringify(workflow, null, 2)}`,
          }]
        };
      } catch (error) {
        return {
          content: [{
            type: "text",
            text: error instanceof Error ? error.message : "Unknown error occurred",
          }],
          isError: true
        };
      }
    }
  • N8nClient helper method implementing the activation logic via POST to n8n REST API /workflows/{id}/activate.
    async activateWorkflow(id: string): Promise<N8nWorkflow> {
      return this.makeRequest<N8nWorkflow>(`/workflows/${id}/activate`, {
        method: 'POST',
      });
    }
  • src/index.ts:484-494 (registration)
    Tool registration in list-tools response: defines name, description, and input schema for 'activate-workflow'.
      name: "activate-workflow",
      description: "Activate a workflow by ID. This will enable the workflow to run. IMPORTANT: Arguments must be provided as compact, single-line JSON without whitespace or newlines.",
      inputSchema: {
        type: "object",
        properties: {
          clientId: { type: "string" },
          id: { type: "string" }
        },
        required: ["clientId", "id"]
      }
    },
  • Input schema definition for 'activate-workflow' tool: requires clientId (string) and id (string).
    inputSchema: {
      type: "object",
      properties: {
        clientId: { type: "string" },
        id: { type: "string" }
      },
      required: ["clientId", "id"]
    }
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states the tool enables a workflow to run, implying a mutation, but doesn't disclose behavioral traits such as permissions required, whether activation is reversible, side effects, or rate limits. The JSON formatting note is helpful but insufficient for a mutation tool with zero annotation coverage.

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 appropriately sized and front-loaded, with the core purpose stated first and a critical formatting note added concisely. Both sentences earn their place by providing essential information without redundancy or fluff.

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 tool's complexity (mutation with 2 parameters), lack of annotations, and no output schema, the description is incomplete. It doesn't cover parameter meanings, behavioral context, or return values, making it inadequate for safe and effective use by an AI agent.

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. It mentions 'ID' but doesn't explain what 'clientId' or 'id' represent (e.g., workflow identifier vs. client context). No details on parameter formats, sources, or constraints are provided, leaving both parameters largely undocumented beyond their names in the schema.

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 ('Activate') and resource ('workflow by ID'), specifying what the tool does. It distinguishes from sibling 'deactivate-workflow' by indicating enabling vs. disabling. However, it doesn't fully differentiate from other workflow-related tools like 'update-workflow' or 'get-workflow' beyond the activation action.

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. It doesn't mention prerequisites (e.g., workflow must exist and be deactivated), exclusions, or compare with siblings like 'deactivate-workflow' or 'update-workflow'. The only usage hint is about JSON formatting, which is technical rather than contextual.

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