Skip to main content
Glama
DrBalls

n8n MCP Server

by DrBalls

n8n_delete_variable

Remove a variable from n8n automation workflows. Note: This action breaks any workflows currently using the deleted variable.

Instructions

Delete a variable.

⚠️ WARNING: Workflows using this variable will break!

Args:

  • id (string): Variable ID to delete

Returns: Confirmation of deletion.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe unique identifier of the resource

Implementation Reference

  • The implementation of the 'n8n_delete_variable' tool. It registers the tool with the MCP server, defines its schema, and calls the 'del' service function to delete the variable.
      server.registerTool(
        'n8n_delete_variable',
        {
          title: 'Delete n8n Variable',
          description: `Delete a variable.
    
    ⚠️ WARNING: Workflows using this variable will break!
    
    Args:
      - id (string): Variable ID to delete
    
    Returns:
      Confirmation of deletion.`,
          inputSchema: IdParamSchema,
          annotations: {
            readOnlyHint: false,
            destructiveHint: true,
            idempotentHint: true,
            openWorldHint: false
          }
        },
        async (params: z.infer<typeof IdParamSchema>) => {
          await del(`/variables/${params.id}`);
          
          return {
            content: [{ type: 'text', text: `✅ Variable ${params.id} deleted successfully.` }],
            structuredContent: { deleted: true, id: params.id }
          };
        }
      );

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