n8n_delete_credential
Permanently remove stored credentials from n8n workflows. Ensure dependent workflows are deactivated first to prevent workflow disruption.
Instructions
Remove stored credential. Cannot delete credentials currently used in active workflows. Deactivate dependent workflows first. Use with caution as this may break workflows.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Credential ID to permanently delete |
Implementation Reference
- src/n8n-client.ts:146-148 (handler)The actual handler that executes the n8n_delete_credential tool. Makes a DELETE request to the n8n API endpoint /api/v1/credentials/{id} with authentication headers.
async deleteCredential(id: string) { return this.request(`${this.apiBase}/credentials/${id}`, { method: 'DELETE' }); } - src/tools.ts:307-323 (schema)Schema definition for n8n_delete_credential tool. Defines the input parameters (id as required string), description, and annotations indicating this is a destructive operation.
name: 'n8n_delete_credential', description: 'Remove stored credential. Cannot delete credentials currently used in active workflows. Deactivate dependent workflows first. Use with caution as this may break workflows.', inputSchema: { type: 'object', properties: { id: { type: 'string', description: 'Credential ID to permanently delete' }, }, required: ['id'], }, annotations: { title: 'Delete Credential', readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: true, }, }, - src/server.ts:61-62 (registration)Routing logic in the handleToolCall function that maps the 'n8n_delete_credential' tool name to the client.deleteCredential method, passing args.id as the parameter.
case 'n8n_delete_credential': return client.deleteCredential(args.id); - src/types.ts:37-44 (helper)Type definition for N8nCredential objects, defining the structure of credential data including id, name, type, data, and timestamps.
export interface N8nCredential { id: string; name: string; type: string; data?: any; createdAt: string; updatedAt: string; }