Skip to main content
Glama
DrBalls

n8n MCP Server

by DrBalls

n8n_update_credential

Update existing credentials in n8n workflows by modifying names, data, or both to maintain secure automation connections.

Instructions

Update an existing credential.

Args:

  • id (string): Credential ID to update

  • name (string, optional): New credential name

  • data (object, optional): Updated credential data

Returns: The updated credential (without sensitive data).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesCredential ID to update
nameNoNew credential name
dataNoUpdated credential data

Implementation Reference

  • The registration and handler implementation for the n8n_update_credential tool. It uses a patch request to update the credential.
      server.registerTool(
        'n8n_update_credential',
        {
          title: 'Update n8n Credential',
          description: `Update an existing credential.
    
    Args:
      - id (string): Credential ID to update
      - name (string, optional): New credential name
      - data (object, optional): Updated credential data
    
    Returns:
      The updated credential (without sensitive data).`,
          inputSchema: UpdateCredentialSchema,
          annotations: {
            readOnlyHint: false,
            destructiveHint: false,
            idempotentHint: true,
            openWorldHint: false
          }
        },
        async (params: z.infer<typeof UpdateCredentialSchema>) => {
          const { id, ...updateData } = params;
          const credential = await patch<N8nCredential>(`/credentials/${id}`, updateData);
          
          return {
            content: [{ type: 'text', text: `✅ Credential updated!\n\n${formatCredential(credential)}` }],
            structuredContent: credential
          };
        }
      );
  • The schema definition import for the UpdateCredential tool.
      UpdateCredentialSchema,
      ListCredentialsSchema,
      CredentialSchemaRequestSchema,
      IdParamSchema,
      TransferToProjectSchema
    } from '../schemas/index.js';

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

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