Skip to main content
Glama

up_list_accounts

Retrieve all your banking accounts with balances, account types, and ownership details. Filter by account type or ownership to view specific account information.

Instructions

List all accounts for the authenticated user. Returns account balances, types (SAVER, TRANSACTIONAL, HOME_LOAN), and ownership information.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
accountTypeNoFilter by account type
ownershipTypeNoFilter by ownership type

Implementation Reference

  • Core handler function in UpApiClient that lists accounts with optional filters by constructing the API endpoint and calling makeRequest.
    async listAccounts(filters?: { accountType?: "SAVER" | "TRANSACTIONAL" | "HOME_LOAN"; ownershipType?: "INDIVIDUAL" | "JOINT"; }): Promise<{ data: AccountResource[] }> { let endpoint = "/accounts"; const params = new URLSearchParams(); if (filters?.accountType) { params.append("filter[accountType]", filters.accountType); } if (filters?.ownershipType) { params.append("filter[ownershipType]", filters.ownershipType); } if (params.toString()) { endpoint += `?${params.toString()}`; } return this.makeRequest(endpoint); }
  • MCP tool dispatch handler case that extracts arguments, calls client.listAccounts, and returns JSON-formatted result as text content.
    case "up_list_accounts": { const args = request.params.arguments as { accountType?: "SAVER" | "TRANSACTIONAL" | "HOME_LOAN"; ownershipType?: "INDIVIDUAL" | "JOINT"; }; const result = await client.listAccounts(args); return { content: [ { type: "text", text: JSON.stringify(result, null, 2), }, ], }; }
  • Input schema defining optional filters for accountType and ownershipType.
    inputSchema: { type: "object", properties: { accountType: { type: "string", enum: ["SAVER", "TRANSACTIONAL", "HOME_LOAN"], description: "Filter by account type", }, ownershipType: { type: "string", enum: ["INDIVIDUAL", "JOINT"], description: "Filter by ownership type", }, }, },
  • src/index.ts:227-246 (registration)
    Tool registration in TOOLS array, including name, description, and input schema.
    { name: "up_list_accounts", description: "List all accounts for the authenticated user. Returns account balances, types (SAVER, TRANSACTIONAL, HOME_LOAN), and ownership information.", inputSchema: { type: "object", properties: { accountType: { type: "string", enum: ["SAVER", "TRANSACTIONAL", "HOME_LOAN"], description: "Filter by account type", }, ownershipType: { type: "string", enum: ["INDIVIDUAL", "JOINT"], description: "Filter by ownership type", }, }, }, },
  • Helper method used by listAccounts to make authenticated API requests to Up API.
    private async makeRequest<T>(endpoint: string): Promise<T> { const url = `${this.config.baseUrl}${endpoint}`; const response = await fetch(url, { headers: { Authorization: `Bearer ${this.config.apiToken}`, "Content-Type": "application/json", }, }); if (!response.ok) { const errorText = await response.text(); throw new Error( `Up API error: ${response.status} ${response.statusText}\n${errorText}` ); } return response.json(); }

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/alex1092/up-bank-mcp-server'

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