Skip to main content
Glama

n8n_deactivate_workflow

Stop a workflow from being triggered by deactivating it using its ID.

Instructions

Deactivate a workflow to stop it from being triggered.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe workflow ID to deactivate

Implementation Reference

  • The handler function that implements the core logic of the n8n_deactivate_workflow tool. It validates the workflow ID, calls the N8nApiClient.deactivateWorkflow method, and returns a standardized ToolResult with success status and 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), }, ], }; },
  • The tool schema definition specifying the name, description, and input schema (requiring a workflow ID string) for n8n_deactivate_workflow. This is part of the workflowTools array used for MCP tool listing.
    { 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:122-125 (registration)
    Registration and dispatch logic in the MCP server.handleToolCall method. Checks if the tool name exists in workflowToolHandlers and invokes the corresponding handler with the N8nApiClient and arguments.
    if (name in workflowToolHandlers) { const handler = workflowToolHandlers[name as keyof typeof workflowToolHandlers]; return handler(client, args); }

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