Skip to main content
Glama

get-credential-schema

Retrieve the schema and required fields for creating credentials of a specific type, such as 'cloudflareApi' or 'githubApi', in the N8N MCP server.

Instructions

Show credential data schema for a specific credential type. The credential type name can be found in the n8n UI when creating credentials (e.g., 'cloudflareApi', 'githubApi', 'slackOAuth2Api'). This will show you what fields are required for creating credentials of this type.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
clientIdYes
credentialTypeNameYes

Implementation Reference

  • MCP tool handler for 'get-credential-schema'. Retrieves the N8nClient instance and calls its getCredentialSchema method to fetch the schema from the n8n API, returning the result as JSON or error.
    case "get-credential-schema": {
      const { clientId, credentialTypeName } = args as { clientId: string; credentialTypeName: 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 schema = await client.getCredentialSchema(credentialTypeName);
        return {
          content: [{
            type: "text",
            text: JSON.stringify(schema, null, 2),
          }]
        };
      } catch (error) {
        return {
          content: [{
            type: "text",
            text: error instanceof Error ? error.message : "Unknown error occurred",
          }],
          isError: true
        };
      }
    }
  • Core implementation in N8nClient class that makes the API request to retrieve the credential schema for the given credential type.
    async getCredentialSchema(credentialTypeName: string): Promise<any> {
      return this.makeRequest(`/credentials/schema/${credentialTypeName}`);
    }
  • src/index.ts:677-688 (registration)
    Tool registration in the listTools response, including name, description, and input schema.
    {
      name: "get-credential-schema",
      description: "Show credential data schema for a specific credential type. The credential type name can be found in the n8n UI when creating credentials (e.g., 'cloudflareApi', 'githubApi', 'slackOAuth2Api'). This will show you what fields are required for creating credentials of this type.",
      inputSchema: {
        type: "object",
        properties: {
          clientId: { type: "string" },
          credentialTypeName: { type: "string" }
        },
        required: ["clientId", "credentialTypeName"]
      }
    },
  • Input schema definition for the get-credential-schema tool, specifying clientId and credentialTypeName as required string parameters.
    description: "Show credential data schema for a specific credential type. The credential type name can be found in the n8n UI when creating credentials (e.g., 'cloudflareApi', 'githubApi', 'slackOAuth2Api'). This will show you what fields are required for creating credentials of this type.",
    inputSchema: {
      type: "object",
      properties: {
        clientId: { type: "string" },
        credentialTypeName: { type: "string" }
      },
      required: ["clientId", "credentialTypeName"]
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. While it states what the tool does, it doesn't describe important behavioral aspects like whether this is a read-only operation, what the output format looks like, potential error conditions, or authentication requirements. The description is functional but lacks operational context.

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 efficiently structured in two sentences: the first states the core purpose, the second provides practical guidance with examples. Every sentence adds value, and the information is front-loaded with the main functionality stated immediately.

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

Completeness3/5

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

For a tool with 2 parameters, no annotations, and no output schema, the description provides adequate functional context but lacks operational details. It explains what the tool does and provides parameter guidance, but doesn't cover output format, error handling, or authentication requirements that would be helpful for an agent.

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

Parameters4/5

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

With 0% schema description coverage, the description compensates well by explaining the meaning of 'credentialTypeName' with examples and context about where to find these names. However, it doesn't explain the 'clientId' parameter at all, leaving one of the two required parameters undocumented in the description.

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

Purpose5/5

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

The description clearly states the tool's purpose with specific verbs ('show credential data schema') and resource ('for a specific credential type'). It distinguishes from siblings like 'create-credential' by focusing on schema inspection rather than credential creation, and provides concrete examples of credential types.

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

Usage Guidelines4/5

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

The description provides clear context for when to use this tool: when you need to see what fields are required for creating credentials of a specific type. It mentions where to find credential type names (n8n UI), but doesn't explicitly state when NOT to use it or name specific alternatives among siblings.

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

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

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