Skip to main content
Glama
DrBalls

n8n MCP Server

by DrBalls

Deactivate n8n Workflow

n8n_deactivate_workflow
Idempotent

Stop automated workflow execution in n8n by deactivating it using its unique identifier to prevent scheduled or triggered runs.

Instructions

Deactivate a workflow to stop it from running automatically.

Args:

  • id (string): Workflow ID to deactivate

Returns: The deactivated workflow.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe unique identifier of the resource

Implementation Reference

  • The handler function for n8n_deactivate_workflow tool, which calls the deactivate endpoint.
    async (params: z.infer<typeof IdParamSchema>) => {
      const workflow = await post<N8nWorkflow>(`/workflows/${params.id}/deactivate`);
      
      return {
        content: [{ type: 'text', text: `✅ Workflow deactivated.\n\n${formatWorkflow(workflow)}` }],
        structuredContent: workflow
      };
    }
  • Tool registration for n8n_deactivate_workflow.
      server.registerTool(
        'n8n_deactivate_workflow',
        {
          title: 'Deactivate n8n Workflow',
          description: `Deactivate a workflow to stop it from running automatically.
    
    Args:
      - id (string): Workflow ID to deactivate
    
    Returns:
      The deactivated workflow.`,
          inputSchema: IdParamSchema,
          annotations: {
            readOnlyHint: false,
            destructiveHint: false,
            idempotentHint: true,
            openWorldHint: false
          }
        },
        async (params: z.infer<typeof IdParamSchema>) => {
          const workflow = await post<N8nWorkflow>(`/workflows/${params.id}/deactivate`);
          
          return {
            content: [{ type: 'text', text: `✅ Workflow deactivated.\n\n${formatWorkflow(workflow)}` }],
            structuredContent: workflow
          };
        }
      );
  • Input schema for n8n_deactivate_workflow, which uses IdParamSchema.
    inputSchema: IdParamSchema,
Behavior3/5

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

Annotations already indicate this is a non-destructive, idempotent mutation (readOnlyHint=false, destructiveHint=false, idempotentHint=true). The description adds that it 'stops automatic execution,' which provides useful behavioral context beyond annotations. However, it doesn't mention potential side effects, permissions needed, or what 'deactivated' means for manual triggers.

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 efficiently structured with a clear purpose statement followed by Args and Returns sections. Every sentence earns its place: the first explains what the tool does, and the subsequent lines provide essential parameter and return information without redundancy.

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 (a single-parameter mutation), rich annotations (covering safety and idempotency), and no output schema, the description is mostly complete. It explains the action and return value, but could improve by clarifying the state change (e.g., whether deactivation affects manual triggers or webhooks).

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 the parameter 'id' fully documented in the schema. The description adds no additional parameter semantics beyond what's in the schema, so it meets the baseline of 3. The description does not compensate for any gaps because there are none.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('deactivate'), the resource ('workflow'), and the effect ('stop it from running automatically'). It distinguishes from sibling tools like 'n8n_activate_workflow' by specifying the opposite operation, and from 'n8n_delete_workflow' by indicating this stops execution rather than removing the workflow.

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 context ('to stop it from running automatically') but doesn't explicitly state when to use this versus alternatives like 'n8n_stop_execution' (for active runs) or 'n8n_delete_workflow' (for removal). It mentions the purpose but lacks explicit guidance on prerequisites or exclusions.

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