Skip to main content
Glama

get-credential-schema

Retrieve credential data schema for n8n workflows to identify required fields when configuring API connections like cloudflareApi or slackOAuth2Api.

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

  • Executes the get-credential-schema tool by retrieving the N8nClient and calling its getCredentialSchema method to fetch the schema from the n8n API.
    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
        };
      }
    }
  • Input schema definition for the get-credential-schema tool, specifying clientId and credentialTypeName parameters.
    inputSchema: {
      type: "object",
      properties: {
        clientId: { type: "string" },
        credentialTypeName: { type: "string" }
      },
      required: ["clientId", "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"]
      }
    },
  • N8nClient helper method that makes the API request to retrieve the credential schema for a given credential type.
    async getCredentialSchema(credentialTypeName: string): Promise<any> {
      return this.makeRequest(`/credentials/schema/${credentialTypeName}`);
    }
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It describes the tool as informational ('Show credential data schema'), implying a read-only operation, but does not detail aspects like error handling, response format, or any limitations. It adds some context about credential type sources but lacks comprehensive behavioral traits.

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 appropriately sized and front-loaded, with two sentences that efficiently convey purpose and usage without wasted words. Every sentence adds value: the first states the core function, and the second provides practical guidance with examples.

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?

Given the tool's moderate complexity (2 parameters, no output schema, no annotations), the description is somewhat complete but has gaps. It covers the tool's purpose and usage well, but lacks details on behavioral aspects like response format or error conditions, which are important for a schema-retrieval tool with no structured output documentation.

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?

The input schema has 0% description coverage, so the description must compensate. It explains the meaning of 'credentialTypeName' with examples (e.g., 'cloudflareApi'), but does not clarify 'clientId'. Since there are only 2 parameters and the description partially covers one, it adds moderate value beyond the bare schema.

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 a specific verb ('Show') and resource ('credential data schema'), and distinguishes it from siblings like 'create-credential' by focusing on schema retrieval rather than creation. It explicitly mentions what the tool does: displaying required fields for credential creation.

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 on when to use this tool: when needing to know required fields for creating credentials of a specific type. It includes a practical example of credential type names from the n8n UI, but does not explicitly state when not to use it or name 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

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