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"]

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