chase_transfers
Retrieve recent transfer history from your Chase accounts. Returns a list of transfers made.
Instructions
Get recent transfer history.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:120-128 (registration)Tool 'chase_transfers' is registered in the ListToolsRequestSchema handler with name, description, and empty inputSchema (no parameters required).
{ name: "chase_transfers", description: "Get recent transfer history.", inputSchema: { type: "object", properties: {}, }, }, - src/browser.ts:48-55 (schema)The Transfer interface defines the schema for transfer objects returned by the tool: id, fromAccount, toAccount, amount, date, and status.
export interface Transfer { id: string; fromAccount: string; toAccount: string; amount: number; date: string; status: "pending" | "completed" | "failed"; } - src/index.ts:335-346 (handler)The CallToolRequestSchema handler for 'chase_transfers' which calls getTransfers() and returns the result as JSON.
case "chase_transfers": { const result = await getTransfers(); return { content: [ { type: "text", text: JSON.stringify(result), }, ], isError: !result.success, }; } - src/browser.ts:357-400 (helper)The getTransfers() function is the core implementation. It navigates to the Chase transfer page, scrapes transfer rows, and returns an array of Transfer objects (up to 20) with success/error status.
export async function getTransfers(): Promise<{ success: boolean; transfers?: Transfer[]; error?: string }> { try { const p = await getPage(); await p.goto(`${CHASE_BASE_URL}/web/auth/transfer`, { waitUntil: "networkidle" }); await p.waitForTimeout(2000); const transfers = await p.$$eval( '.transfer-row, .activity-row, [data-testid="transfer"]', (elements) => elements.slice(0, 20).map((el, index) => { const fromEl = el.querySelector('.from-account, .source'); const toEl = el.querySelector('.to-account, .destination'); const amountEl = el.querySelector('.amount'); const dateEl = el.querySelector('.date, .transfer-date'); const statusEl = el.querySelector('.status'); const amountText = amountEl?.textContent?.trim() || '0'; const amount = parseFloat(amountText.replace(/[$,]/g, '')) || 0; let status: 'pending' | 'completed' | 'failed' = 'completed'; const statusText = statusEl?.textContent?.toLowerCase() || ''; if (statusText.includes('pending')) status = 'pending'; else if (statusText.includes('failed') || statusText.includes('cancelled')) status = 'failed'; return { id: el.getAttribute('data-transfer-id') || `transfer-${index}`, fromAccount: fromEl?.textContent?.trim() || 'Unknown', toAccount: toEl?.textContent?.trim() || 'Unknown', amount, date: dateEl?.textContent?.trim() || '', status, }; }), ); return { success: true, transfers }; } catch (error) { return { success: false, error: error instanceof Error ? error.message : "Failed to get transfers", }; } }