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
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Variable ID | |
| key | No | New variable key | |
| value | No | New variable value | |
| type | No | Variable type |
Implementation Reference
- src/index.ts:235-242 (handler)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) }], }; } - src/index.ts:682-694 (schema)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'], },