Skip to main content
Glama

n8n_update_variable

Update environment variables in n8n workflows by modifying their ID, key, value, or type to maintain workflow configurations.

Instructions

Update an environment variable

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesVariable ID
keyNoNew variable key
valueNoNew variable value
typeNoVariable type

Implementation Reference

  • Handler logic for 'n8n_update_variable' that calls n8nClient.updateVariable.
    case 'n8n_update_variable': {
      if (!args?.id) throw new Error('id is required');
      const { id, ...data } = args;
      const result = await n8nClient.updateVariable(id as string, data);
      return {
        content: [{ type: 'text', text: formatResponse(result) }],
      };
    }
  • Input schema definition for the 'n8n_update_variable' tool.
    {
      name: 'n8n_update_variable',
      description: 'Update an environment variable',
      inputSchema: {
        type: 'object',
        properties: {
          id: { type: 'string', description: 'Variable ID' },
          key: { type: 'string', description: 'New variable key' },
          value: { type: 'string', description: 'New variable value' },
          type: { type: 'string', description: 'Variable type' },
        },
        required: ['id'],
      },
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure yet only states the mutation type without clarifying if partial updates are supported (optional parameters suggest yes), what happens to omitted fields, or required permissions. For a destructive-capable operation, this lack of safety context is a significant gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The four-word description is maximally efficient with zero redundancy, presenting the core action immediately. However, given the absence of annotations and output schema, this extreme brevity becomes a liability rather than a virtue, leaving insufficient contextual information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

As a mutation tool with four parameters, no annotations, and no output schema, the minimal description fails to compensate for missing structured metadata. It omits critical context such as success/failure indicators, side effects on running workflows, or whether the update is atomic.

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 input schema achieves 100% description coverage, documenting each parameter's basic purpose (id, key, value, type). The description adds no additional semantic detail regarding valid 'type' values, key naming conventions, or value constraints, but meets the baseline expectation given the comprehensive schema coverage.

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

Purpose4/5

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

The description clearly identifies the action ('Update') and resource ('environment variable'), establishing a distinct purpose from siblings like n8n_create_variable or n8n_delete_variable through the verb choice. However, it lacks scoping details or behavioral constraints that would fully differentiate it from other variable management operations.

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

Usage Guidelines2/5

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

The description provides no guidance on when to prefer this tool over n8n_create_variable (for new variables) or when partial updates versus full replacements are appropriate. No prerequisites, error conditions, or ownership requirements are mentioned.

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/Shravan1610/n8n-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server