Skip to main content
Glama

Bunq MCP

by WilcoKruijer
paymentUtils.ts1.26 kB
export function validateCounterpartyFields( counterpartyIban?: string, counterpartyEmail?: string, counterpartyPhone?: string, ) { const provided = [counterpartyIban, counterpartyEmail, counterpartyPhone].filter(Boolean); if (provided.length !== 1) { return { content: [ { type: "text", text: "You must provide exactly one of counterpartyIban, counterpartyEmail, or counterpartyPhone.", }, ], isError: true, }; } return null; } export type CounterpartyAlias = | { type: "IBAN"; value: string; name?: string } | { type: "EMAIL"; value: string; name?: string } | { type: "PHONE_NUMBER"; value: string; name?: string }; export function getCounterpartyAlias( counterpartyIban?: string, counterpartyEmail?: string, counterpartyPhone?: string, counterpartyName?: string, ): CounterpartyAlias | undefined { if (counterpartyIban) { return { type: "IBAN", value: counterpartyIban, name: counterpartyName }; } else if (counterpartyEmail) { return { type: "EMAIL", value: counterpartyEmail, name: counterpartyName }; } else if (counterpartyPhone) { return { type: "PHONE_NUMBER", value: counterpartyPhone, name: counterpartyName }; } return undefined; }

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/WilcoKruijer/bunq-mcp'

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