Skip to main content
Glama

activate-workflow

Enable an n8n workflow to run by providing its ID and client ID through the MCP server, allowing automated workflow activation.

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'. Retrieves N8nClient by clientId, calls client.activateWorkflow(id), formats and returns the workflow 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
        };
      }
    }
  • Input schema definition for the 'activate-workflow' tool, specifying clientId and id as required string parameters.
      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"]
      }
    },
  • src/index.ts:484-494 (registration)
    Registration of the 'activate-workflow' tool in the server's list of tools returned by ListToolsRequestSchema handler.
      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"]
      }
    },
  • N8nClient helper method that performs the actual API call to activate a workflow by sending a POST request to `/workflows/${id}/activate`.
    async activateWorkflow(id: string): Promise<N8nWorkflow> {
      return this.makeRequest<N8nWorkflow>(`/workflows/${id}/activate`, {
        method: 'POST',
      });
    }
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 'will enable the workflow to run', implying a state change (activation), but doesn't disclose behavioral traits such as permissions required, whether activation is immediate or scheduled, error conditions (e.g., if already active), or what happens to running executions. The JSON formatting note is a behavioral constraint but limited in scope.

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 appropriately sized with two sentences: the first states the purpose, and the second provides a critical formatting constraint. It's front-loaded with the main action. However, the second sentence could be integrated more smoothly, and there's room to add essential usage details without bloating.

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 no annotations, 0% schema coverage, no output schema, and a mutation tool (activation), the description is incomplete. It lacks details on permissions, error handling, activation effects, and parameter meanings. While concise, it doesn't provide enough context for safe and effective use, especially compared to siblings like 'deactivate-workflow'.

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 'workflow by ID', implying the 'id' parameter, and notes JSON formatting for arguments, but doesn't explain 'clientId' or provide meaning for either parameter beyond basic identification. The description adds minimal value over the bare schema, failing to clarify parameter purposes or constraints.

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 ('activate') and resource ('workflow by ID'), specifying that it 'will enable the workflow to run'. It distinguishes from sibling 'deactivate-workflow' by implication, though not explicitly named. 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, be in a deactivated state), when not to use it, or compare to siblings like 'deactivate-workflow' or 'update-workflow'. The only contextual note is about JSON formatting, which is parameter-related rather than usage guidance.

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

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