Skip to main content
Glama

n8n_create_credential

Create a new credential in n8n for workflow authentication and API access. Specify name, type, and data to store secure credentials.

Instructions

Create a new credential

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesCredential name
typeYesCredential type
dataYesCredential data

Implementation Reference

  • The actual implementation of the tool handler, which sends a POST request to the n8n API's /credentials endpoint.
    async createCredential(data: any): Promise<any> {
      const response = await this.client.post('/credentials', data);
      return response.data;
    }
  • The MCP tool handler in src/index.ts that validates input and calls the n8nClient's createCredential method.
    case 'n8n_create_credential': {
      if (!args?.name || !args?.type || !args?.data) {
        throw new Error('name, type, and data are required');
      }
      const result = await n8nClient.createCredential(args);
      return {
        content: [{ type: 'text', text: formatResponse(result) }],
      };
    }
  • src/index.ts:613-625 (registration)
    The registration of the n8n_create_credential tool, including its schema definition.
    {
      name: 'n8n_create_credential',
      description: 'Create a new credential',
      inputSchema: {
        type: 'object',
        properties: {
          name: { type: 'string', description: 'Credential name' },
          type: { type: 'string', description: 'Credential type' },
          data: { type: 'object', description: 'Credential data' },
        },
        required: ['name', 'type', 'data'],
      },
    },
Behavior2/5

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

With no annotations provided, the description carries the full disclosure burden but fails to mention permissions required, idempotency behavior, naming constraints, or what the operation returns.

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

Conciseness3/5

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

The description is brief (4 words) and not verbose, but it is under-loaded; the single sentence fails to earn its place by providing actionable guidance beyond the tool name itself.

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?

For a sensitive credential creation operation with nested object parameters and no output schema or annotations, the description is insufficiently complete; it omits critical context like credential type discovery and data structure requirements.

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?

Schema coverage is 100% (all three parameters have descriptions), establishing a baseline of 3. The description adds no additional semantic context beyond the schema, particularly for the opaque 'data' object parameter.

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

Purpose3/5

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

The description states the basic action (Create) and resource (credential) but lacks specificity about the n8n domain context or what distinguishes this from sibling operations like transfer_credential.

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?

No guidance provided on when to use this tool versus alternatives, or prerequisites such as needing to know credential types/schemas beforehand (relevant given sibling n8n_get_credential_schema exists).

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

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