n8n_delete_variable
Remove an environment variable from n8n workflows by specifying its ID to manage configuration settings.
Instructions
Delete an environment variable
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Variable ID to delete |
Implementation Reference
- src/n8n-client.ts:176-179 (handler)The n8nClient implementation that performs the HTTP DELETE request to delete a variable.
async deleteVariable(id: string): Promise<any> { const response = await this.client.delete(`/variables/${id}`); return response.data; } - src/index.ts:244-250 (handler)The tool handler switch case in src/index.ts that invokes n8nClient.deleteVariable.
case 'n8n_delete_variable': { if (!args?.id) throw new Error('id is required'); const result = await n8nClient.deleteVariable(args.id as string); return { content: [{ type: 'text', text: `Variable ${args.id as string} deleted successfully` }], }; } - src/index.ts:696-706 (schema)The tool schema definition for n8n_delete_variable.
{ name: 'n8n_delete_variable', description: 'Delete an environment variable', inputSchema: { type: 'object', properties: { id: { type: 'string', description: 'Variable ID to delete' }, }, required: ['id'], }, },