Skip to main content
Glama
DrBalls

n8n MCP Server

by DrBalls

Update n8n Credential

n8n_update_credential
Idempotent

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';
Behavior4/5

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

The description adds valuable context beyond annotations: it specifies that sensitive data is excluded from returns ('without sensitive data'), which annotations don't cover. Annotations already indicate this is a non-destructive, idempotent mutation (readOnlyHint=false, destructiveHint=false, idempotentHint=true), so the description appropriately focuses on output behavior rather than repeating safety information.

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

Conciseness4/5

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

The description is well-structured with clear sections (Args, Returns) and uses only essential sentences. It's appropriately sized for a simple update operation, though the Args section slightly duplicates schema information without adding new insights.

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

Completeness4/5

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

For a mutation tool with good annotations and full parameter documentation, the description is reasonably complete. It covers the core action, parameters, and output behavior. The main gap is lack of usage guidance relative to sibling tools, but annotations handle safety aspects well.

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

Parameters3/5

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

With 100% schema description coverage, the schema already documents all three parameters thoroughly. The description adds minimal value by restating parameter purposes in the Args section but doesn't provide additional context like format examples, constraints, or relationships between parameters beyond what's in the schema.

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 ('Update') and resource ('an existing credential'), making the purpose immediately understandable. However, it doesn't explicitly differentiate this tool from sibling tools like 'n8n_create_credential' or 'n8n_transfer_credential' beyond the obvious verb difference.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing an existing credential ID), when not to use it, or how it differs from similar tools like 'n8n_transfer_credential' or 'n8n_create_credential' beyond the basic verb.

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

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