Skip to main content
Glama
DrBalls

n8n MCP Server

by DrBalls

Delete n8n Variable

n8n_delete_variable
DestructiveIdempotent

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 }
          };
        }
      );
Behavior4/5

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

Annotations already indicate destructiveHint=true and idempotentHint=true, but the description adds valuable context with the warning about breaking workflows, which is not covered by annotations. It does not mention other behavioral traits like authentication needs or rate limits, but the added warning compensates well.

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 front-loaded with the core action, includes a critical warning, and efficiently lists args and returns in a structured format. Every sentence serves a clear purpose without redundancy, making it highly concise and well-organized.

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?

For a destructive tool with no output schema, the description provides essential context like the warning and confirmation of deletion, which helps the agent understand the impact. However, it lacks details on error handling or specific return format, leaving some gaps in completeness.

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 schema description coverage is 100%, so the input schema fully documents the 'id' parameter. The description adds minimal semantics by stating 'Variable ID to delete', which slightly reinforces the schema but does not provide additional details like format or examples.

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 ('Delete') and resource ('a variable'), distinguishing it from sibling tools like n8n_get_variable, n8n_create_variable, and n8n_update_variable. The title reinforces this with 'Delete n8n Variable', making the purpose unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

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

The description includes a warning about workflows breaking, which provides clear context for when to use this tool cautiously. However, it does not explicitly mention alternatives like n8n_update_variable or specify when not to use it, such as for read-only operations handled by n8n_get_variable.

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