Skip to main content
Glama

n8n: Create variable

n8n_create_variable

Create a new n8n environment variable by specifying the site, key, and value; requires an Enterprise or Pro license.

Instructions

[UNIFIED] [Enterprise] Create a new environment variable. Requires n8n Enterprise/Pro license.

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": {
      "site": "<site>",
      "key": "<key>",
      "value": "<value>"
    },
    "name": "n8n_create_variable"
  }
}

Input Schema

NameRequiredDescriptionDefault
keyYes
siteYes
valueYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv3.14.0
  2. Removedv3.13.1
  3. First observedv3.4.0

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, idempotentHint=false and destructiveHint=false, so the safety profile is covered. The description adds a genuinely useful prerequisite (Enterprise/Pro license). However, it does not explain the consequence of the non-idempotent flag — whether creating a duplicate key errors or overwrites — which is the key behavioral risk for this tool.

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?

Two short clauses, action front-loaded before the license caveat. The bracket tags '[UNIFIED] [Enterprise]' are internal metadata that consume space without helping an agent decide or call.

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

Completeness5/5

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

Placeholder.

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

Parameters2/5

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

Schema description coverage is 0% across all three required parameters, so the description carries the full burden and does not meet it. It never clarifies what 'site' means (instance, project, workspace?), whether 'key' must be unique or namespaced, or whether 'value' is stored as plaintext or a secret.

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?

States a specific verb and resource: 'Create a new environment variable.' The verb/resource pairing separates it cleanly from n8n_get_variable, n8n_update_variable and n8n_delete_variable. It does not explicitly name those siblings, and the '[UNIFIED] [Enterprise]' prefixes are noise rather than scope information.

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

Usage Guidelines3/5

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

Usage is only implied by the create verb; there is no explicit statement of when to use this versus update or get, and no mention of what happens if the key already exists. The Enterprise/Pro license note does act as a precondition gate, which is more than nothing.

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

Deploy Server

Other Tools