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"]
    }
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 a behavioral trait, but fails to disclose critical details: whether the deletion is permanent or reversible, if there are rate limits, what happens to associated data, or what the response looks like (e.g., success/failure messages). 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 extremely concise with two sentences that directly convey the core action and a key constraint. Every word earns its place, and it's front-loaded with the primary purpose. No unnecessary information or redundancy is present.

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 (a destructive delete operation), lack of annotations, 0% schema coverage, and no output schema, the description is incomplete. It misses critical context such as parameter details, behavioral implications (e.g., permanence), and response format, making it insufficient for safe and effective use by an AI agent.

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 for two undocumented parameters. It only mentions 'ID' (likely corresponding to the 'id' parameter) but omits 'clientId' entirely. No details on parameter formats, constraints, or examples are provided, leaving significant gaps in understanding.

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. It distinguishes from siblings like 'delete-project' or 'delete-user' by specifying the credential resource type. However, it doesn't explicitly contrast with similar tools like 'delete-execution' or 'delete-workflow' beyond the resource name.

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 provides one usage guideline: 'You must be the owner of the credentials.' This implies a permission requirement but doesn't specify when to use this tool versus alternatives like 'delete-project' or 'delete-user', nor does it mention prerequisites beyond ownership. No explicit alternatives or exclusions are stated.

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

Install Server

Other Tools

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