Skip to main content
Glama
DrBalls

n8n MCP Server

by DrBalls

n8n_deactivate_workflow

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,

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