get_account_transactions
Retrieve transaction history for a specific bank account using its IBAN to view recent financial activity and monitor account movements.
Instructions
Retrieves the transactions for a specific bank account IBAN.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| iban | Yes | The IBAN of the account to fetch transactions for | |
| days_ago | No | Number of days of history to fetch (default: 30) |
Implementation Reference
- src/mcp/Server.ts:61-75 (handler)The handler function for 'get_account_transactions' which fetches transactions via apiClient.
async ({ iban, days_ago }) => { await this.ensureAuthenticated(); try { const accountId = await this.apiClient.resolveAccountId(iban); const transactions = await this.apiClient.getTransactions(accountId, days_ago || 30); return { content: [{ type: "text", text: JSON.stringify(transactions, null, 2) }] }; } catch (error: any) { return { isError: true, content: [{ type: "text", text: `Error fetching transactions: ${error.message}` }] }; } } - src/mcp/Server.ts:54-76 (registration)Registration of the 'get_account_transactions' tool, including its schema definition.
this.server.tool( "get_account_transactions", "Retrieves the transactions for a specific bank account IBAN.", { iban: z.string().describe("The IBAN of the account to fetch transactions for"), days_ago: z.number().optional().describe("Number of days of history to fetch (default: 30)") }, async ({ iban, days_ago }) => { await this.ensureAuthenticated(); try { const accountId = await this.apiClient.resolveAccountId(iban); const transactions = await this.apiClient.getTransactions(accountId, days_ago || 30); return { content: [{ type: "text", text: JSON.stringify(transactions, null, 2) }] }; } catch (error: any) { return { isError: true, content: [{ type: "text", text: `Error fetching transactions: ${error.message}` }] }; } } );