Skip to main content
Glama
transaction-mapper.ts665 B
// Maps and formats transaction data for get-transactions tool import { formatAmount, formatDate } from '../../utils.js'; import type { Transaction } from '../../types.js'; export class GetTransactionsMapper { map(transactions: Transaction[]): Array<{ id: string; date: string; payee: string; category: string; amount: string; notes: string; }> { return transactions.map((t) => ({ id: t.id, date: formatDate(t.date), payee: t.payee_name || t.payee || '(No payee)', category: t.category_name || t.category || '(Uncategorized)', amount: formatAmount(t.amount), notes: t.notes || '', })); } }

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/s-stefanov/actual-mcp'

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