Skip to main content
Glama

delete-credential

Remove stored credentials from the n8n automation platform by ID to manage access control and maintain security.

Instructions

Delete a credential by ID. You must be the owner of the credentials.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
clientIdYes
idYes

Implementation Reference

  • MCP server tool handler for 'delete-credential'. Validates client, calls N8nClient.deleteCredential(id), and returns success or error response.
    case "delete-credential": {
      const { clientId, id } = args as { clientId: string; id: string };
      const client = clients.get(clientId);
      if (!client) {
        return {
          content: [{
            type: "text",
            text: "Client not initialized. Please run init-n8n first.",
          }],
          isError: true
        };
      }
    
      try {
        const result = await client.deleteCredential(id);
        return {
          content: [{
            type: "text",
            text: `Successfully deleted credential:\n${JSON.stringify(result, null, 2)}`,
          }]
        };
      } catch (error) {
        return {
          content: [{
            type: "text",
            text: error instanceof Error ? error.message : "Unknown error occurred",
          }],
          isError: true
        };
      }
    }
  • N8nClient method implementing the delete credential API call via DELETE /credentials/{id}.
    async deleteCredential(id: string): Promise<any> {
      return this.makeRequest(`/credentials/${id}`, {
        method: 'DELETE',
      });
    }
  • src/index.ts:665-676 (registration)
    Tool registration in the ListTools response, defining name, description, and input schema requiring clientId and id.
    {
      name: "delete-credential",
      description: "Delete a credential by ID. You must be the owner of the credentials.",
      inputSchema: {
        type: "object",
        properties: {
          clientId: { type: "string" },
          id: { type: "string" }
        },
        required: ["clientId", "id"]
      }
    },
  • Input schema for delete-credential tool, specifying clientId and credential id as required string parameters.
    inputSchema: {
      type: "object",
      properties: {
        clientId: { type: "string" },
        id: { type: "string" }
      },
      required: ["clientId", "id"]
    }

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

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