Skip to main content
Glama

get_credential_schema

Retrieve JSON schema for specific credential types to understand required fields and structure when configuring n8n workflow credentials.

Instructions

Get JSON schema for a credential type

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
credentialTypeNameYesThe name of the credential type

Implementation Reference

  • The main handler function for the MCP 'get_credential_schema' tool. It extracts the credentialTypeName from arguments, calls the N8nClient's getCredentialSchema method, and returns the result as a formatted JSON 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 server's tool list, including its 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'] } },
  • Helper method in N8nClient that performs the actual API call to retrieve the credential schema from n8n's /credential-types/{type} endpoint.
    async getCredentialSchema(credentialTypeName: string): Promise<N8nCredentialSchema> { const response = await this.api.get<N8nApiResponse<N8nCredentialSchema>>(`/credential-types/${credentialTypeName}`); return response.data.data; }
  • src/index.ts:266-267 (registration)
    Dispatch case in the MCP CallToolRequest handler that routes 'get_credential_schema' calls to the specific handler method.
    case 'get_credential_schema': return await this.handleGetCredentialSchema(request.params.arguments as { credentialTypeName: string });

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