Skip to main content
Glama
tcs-n8n-mcp
by ntatschner

update_variable

Idempotent

Replace both the key and value of an existing n8n variable by ID to correct or rename stored configuration values.

Instructions

Replace both the key and value of an existing n8n variable.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "variableId": "<variableId>",
      "key": "<key>",
      "value": "<value>"
    },
    "name": "update_variable"
  }
}

Input Schema

NameRequiredDescriptionDefault
keyYes
valueYes
projectIdNo
variableIdYesOpaque n8n resource ID

Output Schema

NameRequiredDescriptionDefault
idNo
keyNo
messageYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

B3.2/5.0
Behavior3/5

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

The annotations already declare readOnlyHint=false, destructiveHint=false and idempotentHint=true, so the safety profile is covered. The description adds one genuinely useful behavioral fact: both key and value are replaced wholesale rather than patched. It says nothing about permission requirements, key-uniqueness collisions, or how projectId affects scope.

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?

A single front-loaded sentence with no filler; the replacement semantics are stated immediately. It is efficient, though its brevity is partly the source of the coverage gaps rather than a model of compact completeness.

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

Completeness3/5

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

An output schema exists, so return values need not be described, and annotations carry the safety profile. Still, for a mutation tool with four parameters and 25% schema coverage, the definition omits projectId scoping and any failure conditions, leaving it only minimally complete.

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?

Schema coverage is only 25%, so the description is expected to compensate, and it does explain that key and value are both overwritten (full replacement rather than a partial patch). However, it says nothing about variableId's role or the optional projectId, which are undocumented elsewhere, leaving half the surface unexplained.

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 uses a specific verb ("Replace") plus the exact resource ("key and value of an existing n8n variable"), which lets an agent distinguish it from create_variable and delete_variable. It stops short of naming any sibling explicitly, so it is clear but not fully differentiated.

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 word "existing" weakly implies the variable must already exist, but there is no explicit when-to-use guidance, no prerequisite (permission or scope) statement, and no comparison to siblings such as create_variable or update_tag. The agent must infer all routing decisions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.