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"]
    }

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It mentions the ownership requirement, which is useful, but doesn't disclose other behavioral traits such as whether the deletion is permanent, reversible, requires confirmation, has side effects, or what happens on success/failure. For a destructive operation with zero annotation coverage, this is inadequate.

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

Conciseness5/5

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

The description is two concise sentences with zero waste, front-loading the core action and following with a key constraint. Every sentence earns its place by providing essential information efficiently.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (destructive operation), lack of annotations, 0% schema coverage, and no output schema, the description is incomplete. It misses critical details like parameter meanings, behavioral outcomes, and error handling, making it insufficient for safe and effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It mentions 'ID' but doesn't explain what 'clientId' or 'id' represent, their formats, or relationships. The description adds minimal meaning beyond the schema, failing to address the undocumented parameters adequately.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Delete') and resource ('credential by ID'), making the purpose unambiguous. However, it doesn't differentiate from sibling tools like 'delete-execution', 'delete-project', etc., which follow the same pattern, so it's not fully distinctive.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description includes a prerequisite ('You must be the owner of the credentials'), which implies when to use it based on ownership. However, it doesn't explicitly state when to choose this tool over alternatives like 'delete-user' or provide exclusions, leaving usage context partially implied.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.