Skip to main content
Glama

n8n_manage_variables

Destructive

Create, read, update, and delete n8n instance variables that workflows consume as key/value pairs in expressions.

Instructions

Manage n8n instance variables - the read-only key/value pairs workflows read in expressions as {{ $vars.KEY }}. Actions: list, get, create, update, delete. Variables need an n8n license that includes them (not the free Community edition) and an API key with variable:* scopes. Keys are unique per scope: global (default) or one project. Values are plain strings of up to 1000 characters, readable by everyone in the variable's scope - keep secrets in credentials, not variables.

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": {
      "action": "<action>"
    },
    "name": "n8n_manage_variables"
  }
}

Input Schema

NameRequiredDescriptionDefault
idNoVariable ID (required for update and delete; for get, alternative to key)
keyNoFor create: variable key (required; letters, digits and underscores, not starting with a digit, max 50). For get: look up by key. For update: new key.
limitNoFor list: page size (1-250, default 100)
stateNoFor list: 'empty' returns only variables whose value is empty
valueNoFor create: variable value (required, max 1000 characters). For update: new value; an empty string counts as omitted - use clearValue to empty it.
actionYesOperation: list=page through variables, get=one variable by id or key, create=new variable, update=change key, value or scope, delete=remove variable
cursorNoFor list: pagination cursor from the previous response's nextCursor
projectIdNoScope. For create: project to create the variable in (omit or 'global' for a global variable). For update: project to move it to, or null/'global' to make it global; omit to keep the current scope. For list/get: only variables of this project, or 'global' for global variables only.
clearValueNoFor update: set the value to an empty string

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.103.2

TDQS

A4.6/5.0
Behavior5/5

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

Annotations declare destructiveHint=true and readOnlyHint=false, and the description adds substantial context beyond them: the licensing requirement, the required API-key scope class, key uniqueness per scope, a 1000-character value ceiling, and the important disclosure that values are readable by everyone in the variable's scope. That visibility warning plus the auth prerequisites is exactly the kind of behavioral context annotations cannot convey.

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?

Two tight sentences: identity/definition first, then the action list, then constraints and the security caveat. Every clause carries a distinct operational fact (license, scopes, scope uniqueness, size limit, exposure risk) with no restatement of the tool name and no filler.

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 9-parameter mutation tool with no output schema, the definition covers the essentials an agent needs before calling: prerequisites, scope model, value constraints, and the security implication of storing data here. The main residual gap is that delete is not flagged as irreversible in prose, though destructiveHint=true already signals that, and pagination shape is left to the schema's cursor/nextCursor descriptions.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so per-parameter meaning is already carried by the schema and the baseline would be 3. The description still adds value the schema does not: the rule that keys are unique per scope, the global-versus-project scoping model, and the semantic distinction between value and clearValue in the secrecy/emptiness context.

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 names a specific resource (n8n instance variables) and defines it concretely as the read-only key/value pairs consumed via {{ $vars.KEY }}, then enumerates the full action set (list, get, create, update, delete). An agent immediately knows this is CRUD over variables rather than over workflows, credentials, or agents, so the sibling set poses no ambiguity.

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?

It gives clear preconditions for use (an n8n license that includes variables, not Community edition; an API key with variable:* scopes) and implicitly routes secret storage away from this tool ('keep secrets in credentials, not variables'), which is a genuine alternative-resource steer. It stops short of explicitly stating when not to use it versus a sibling tool, but the license/scope gate covers the practical decision point.

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