Skip to main content
Glama

get_credential_schema

Retrieve the JSON schema for a specific credential type to understand required fields and structure when configuring n8n workflow authentication.

Instructions

Get JSON schema for a credential type

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
credentialTypeNameYesThe name of the credential type

Implementation Reference

  • MCP server handler function for the 'get_credential_schema' tool. Extracts credentialTypeName from arguments, calls N8nClient.getCredentialSchema, and returns JSON-formatted success response.
    private async handleGetCredentialSchema(args: { credentialTypeName: string }) { const schema = await this.n8nClient.getCredentialSchema(args.credentialTypeName); return { content: [{ type: 'text', text: JSON.stringify(jsonSuccess(schema), null, 2) }] }; }
  • src/index.ts:182-182 (registration)
    Registration of the 'get_credential_schema' tool in the MCP ListTools response, including name, description, and input schema definition.
    { name: 'get_credential_schema', description: 'Get JSON schema for a credential type', inputSchema: { type: 'object', properties: { credentialTypeName: { type: 'string', description: 'The name of the credential type' } }, required: ['credentialTypeName'] } },
  • N8nClient helper method that performs the actual API call to retrieve the credential schema from the n8n server via GET /api/v1/credential-types/{credentialTypeName}.
    async getCredentialSchema(credentialTypeName: string): Promise<N8nCredentialSchema> { const response = await this.api.get<N8nApiResponse<N8nCredentialSchema>>(`/credential-types/${credentialTypeName}`); return response.data.data; }
  • Input schema definition for the 'get_credential_schema' tool, specifying a required 'credentialTypeName' string parameter.
    { name: 'get_credential_schema', description: 'Get JSON schema for a credential type', inputSchema: { type: 'object', properties: { credentialTypeName: { type: 'string', description: 'The name of the credential type' } }, required: ['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/get2knowio/n8n-mcp'

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