Skip to main content
Glama
verzth

n8n MCP Server

by verzth

Create n8n Variable

n8n_create_variable

Create a global workflow variable that is accessible in all workflows via $vars.key. Provide key, value, and optional type for variable.

Instructions

Create a new global workflow variable accessible in all workflows via $vars.key.

Args:

  • key (string): Variable key/name

  • value (string): Variable value

  • type (string?): Variable type (default 'string')

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYesVariable key/name
typeNoVariable typestring
valueYesVariable value
Behavior3/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false, and idempotentHint=false, so the description doesn't need to repeat those. It adds the useful context that the variable is global and accessible via $vars.key, but it does not disclose behavior such as what happens if the key already exists or any permission requirements. Since annotations cover the safety profile, the description adds moderate value, warranting a 3.

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

Conciseness3/5

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

The opening sentence is concise and clear, but the Args section largely duplicates the input schema descriptions. It adds bulk without new information. The structure is organized but not fully efficient, as every sentence should earn its place. A score of 3 reflects this redundancy.

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?

Given the tool's simplicity (3 params, no output schema, no nested objects), the description adequately covers the purpose and usage context. It explains the global scope and referencing syntax, which is helpful. However, it does not address duplicate key behavior or error conditions, which would be relevant for a create operation. This minor gap prevents a 5, but it remains fairly complete for the complexity level.

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 100%, and the schema already provides descriptions for all parameters. The description's Args section repeats the same information (e.g., 'key: Variable key/name') with the addition of the default for 'type.' This adds no new meaning beyond the schema, so the baseline of 3 is appropriate.

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 tool's function: 'Create a new global workflow variable accessible in all workflows via $vars.key.' This uses a specific verb (create) and resource (global workflow variable), and it distinguishes itself from sibling tools like n8n_update_variable and n8n_list_variables by explicitly focusing on creation.

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 gives clear context about where the variable will be accessible (all workflows via $vars.key), which implies the use case. However, it does not explicitly mention when not to use it or point to alternatives like n8n_update_variable for existing variables. This is a minor gap, so it earns a 4 rather than a 5.

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

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