Skip to main content
Glama

n8n_deactivate_workflow

Stop a workflow from being triggered by deactivating it using its ID. This prevents automated processes from running until reactivated.

Instructions

Deactivate a workflow to stop it from being triggered.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe workflow ID to deactivate

Implementation Reference

  • The main execution handler for the n8n_deactivate_workflow tool. Extracts the workflow ID from arguments, calls the N8nApiClient.deactivateWorkflow method, and returns a formatted success response with the updated workflow details.
    n8n_deactivate_workflow: async (
      client: N8nApiClient,
      args: Record<string, unknown>
    ): Promise<ToolResult> => {
      const id = args.id as string;
      if (!id) {
        throw new Error('Workflow ID is required');
      }
    
      const workflow = await client.deactivateWorkflow(id);
    
      return {
        content: [
          {
            type: 'text' as const,
            text: JSON.stringify({
              success: true,
              message: `Workflow "${workflow.name}" deactivated successfully`,
              workflow: {
                id: workflow.id,
                name: workflow.name,
                active: workflow.active,
              },
            }, null, 2),
          },
        ],
      };
    },
  • Tool schema definition specifying the name, description, and input schema requiring a single 'id' string parameter.
      {
        name: 'n8n_deactivate_workflow',
        description: 'Deactivate a workflow to stop it from being triggered.',
        inputSchema: {
          type: 'object',
          properties: {
            id: {
              type: 'string',
              description: 'The workflow ID to deactivate',
            },
          },
          required: ['id'],
        },
      },
    ];
  • src/server.ts:60-64 (registration)
    MCP server registration for listing tools. Responds to ListToolsRequestSchema by returning the allTools array, which includes the n8n_deactivate_workflow tool schema.
    this.server.setRequestHandler(ListToolsRequestSchema, async () => {
      return {
        tools: allTools,
      };
    });
  • src/server.ts:122-125 (registration)
    Tool call dispatch registration. Routes execution requests for workflow tools, including n8n_deactivate_workflow, to the corresponding handler in workflowToolHandlers.
    if (name in workflowToolHandlers) {
      const handler = workflowToolHandlers[name as keyof typeof workflowToolHandlers];
      return handler(client, args);
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the effect ('stop it from being triggered'), which implies a mutation, but lacks details on permissions required, reversibility (e.g., via 'n8n_activate_workflow'), side effects, or error handling. This is inadequate 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 a single, clear sentence that directly states the tool's purpose without unnecessary words. It is front-loaded and efficiently communicates the core action, making it highly concise and well-structured for quick understanding.

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 as a mutation operation with no annotations and no output schema, the description is incomplete. It fails to address critical aspects like return values, error conditions, or behavioral nuances (e.g., what 'deactivate' entails operationally). This leaves significant gaps for an AI agent to understand the full context of use.

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 documented as 'The workflow ID to deactivate.' The description adds no additional meaning beyond this, such as format examples or constraints. Given the high schema coverage, a baseline score of 3 is appropriate as the schema handles the parameter semantics effectively.

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 ('deactivate') and resource ('workflow') with the purpose to 'stop it from being triggered,' which is specific and actionable. However, it doesn't explicitly differentiate from siblings like 'n8n_delete_workflow' or 'n8n_update_workflow,' which could involve similar workflow modifications, so it misses 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 Guidelines2/5

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

The description implies usage when stopping workflow triggers, but provides no explicit guidance on when to use this tool versus alternatives (e.g., vs. 'n8n_delete_workflow' for permanent removal or 'n8n_update_workflow' for modifications). There's no mention of prerequisites, exclusions, or contextual best practices, leaving gaps in usage direction.

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/alicankiraz1/cursor-n8n-builder'

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