Skip to main content
Glama

resolve_credential_alias

Convert credential aliases to their corresponding IDs for use in n8n workflow operations and API calls.

Instructions

Resolve a credential alias to its ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aliasYesThe credential alias/name to resolve

Implementation Reference

  • MCP server handler for the resolve_credential_alias tool. Delegates to N8nClient and formats the JSON response.
    private async handleResolveCredentialAlias(args: { alias: string }) { const credentialId = await this.n8nClient.resolveCredentialAlias(args.alias); return { content: [ { type: 'text', text: JSON.stringify(jsonSuccess({ alias: args.alias, id: credentialId }), null, 2), }, ], }; }
  • src/index.ts:168-181 (registration)
    Tool registration in ListToolsResponse including name, description, and input schema.
    { name: 'resolve_credential_alias', description: 'Resolve a credential alias to its ID', inputSchema: { type: 'object', properties: { alias: { type: 'string', description: 'The credential alias/name to resolve', }, }, required: ['alias'], }, },
  • Dispatch handler in CallToolRequestHandler switch statement.
    case 'resolve_credential_alias': return await this.handleResolveCredentialAlias(request.params.arguments as { alias: string });
  • Core implementation that lists credentials and finds the one matching the alias by name, returning its ID.
    async resolveCredentialAlias(alias: string): Promise<string> { const credentials = await this.listCredentials(); const matches = credentials.filter(cred => cred.name === alias); if (matches.length === 0) { throw new Error(`No credential found with alias: ${alias}`); } if (matches.length > 1) { throw new Error(`Multiple credentials found with alias: ${alias}. Found ${matches.length} matches.`); } return matches[0].id!.toString(); }

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