Skip to main content
Glama
elcukro

bank-mcp

by elcukro

list_accounts

Retrieve all bank accounts with UIDs, IBANs, names, and currencies from configured financial connections using the bank-mcp server.

Instructions

List all bank accounts across configured connections. Returns account UIDs, IBANs, names, and currencies.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
connectionIdNoConnection ID to query. If omitted, queries all connections.

Implementation Reference

  • Main handler function that executes the list_accounts tool logic - retrieves connections, calls provider.listAccounts(), and returns tagged account list with caching support
    export async function listAccounts(
      args: z.infer<typeof listAccountsSchema>,
    ): Promise<BankAccount[]> {
      const config = loadConfig();
    
      const connections = args.connectionId
        ? [getConnection(config, args.connectionId)]
        : getAllConnections(config);
    
      const allAccounts: BankAccount[] = [];
    
      for (const conn of connections) {
        const cacheKey = `accounts:${conn.id}`;
        const cached = cache.get<BankAccount[]>(cacheKey);
        if (cached) {
          allAccounts.push(...cached);
          continue;
        }
    
        const provider = getProvider(conn.provider);
        const accounts = await provider.listAccounts(conn.config);
    
        // Tag each account with its connection
        const tagged = accounts.map((a) => ({ ...a, connectionId: conn.id }));
        cache.set(cacheKey, tagged, TTL.ACCOUNTS);
        allAccounts.push(...tagged);
      }
    
      return allAccounts;
    }
  • Zod schema defining the input validation for list_accounts tool - optional connectionId parameter
    export const listAccountsSchema = z.object({
      connectionId: z
        .string()
        .optional()
        .describe("Connection ID to query. If omitted, queries all connections."),
    });
  • src/server.ts:25-30 (registration)
    Tool registration in the TOOLS array with name, description, and schema
    {
      name: "list_accounts",
      description:
        "List all bank accounts across configured connections. Returns account UIDs, IBANs, names, and currencies.",
      inputSchema: z.toJSONSchema(listAccountsSchema),
    },
  • src/server.ts:59-68 (registration)
    Handler registration mapping the list_accounts tool name to the handler function with schema validation
    const handlers: Record<string, ToolHandler> = {
      list_accounts: (args) => listAccounts(listAccountsSchema.parse(args)),
      list_transactions: (args) =>
        listTransactions(listTransactionsSchema.parse(args)),
      search_transactions: (args) =>
        searchTransactions(searchTransactionsSchema.parse(args)),
      get_balance: (args) => getBalance(getBalanceSchema.parse(args)),
      spending_summary: (args) =>
        spendingSummary(spendingSummarySchema.parse(args)),
    };
  • Abstract method in BankProvider base class that all provider implementations must override to fetch accounts
    /** Fetch all accounts accessible via this connection. */
    abstract listAccounts(
      config: Record<string, unknown>,
    ): Promise<BankAccount[]>;
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states this is a list operation and describes the return fields, but doesn't cover important aspects like whether it's read-only, pagination behavior, rate limits, authentication requirements, or error conditions. For a tool with zero annotation coverage, this leaves significant gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that clearly states the tool's purpose and return values without any wasted words. It's appropriately sized and front-loaded with essential information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple list tool with one optional parameter and no output schema, the description provides basic purpose and return field information. However, without annotations or output schema, it should ideally cover more behavioral aspects like pagination, sorting, or error handling to be fully complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already fully documents the single optional parameter. The description doesn't add any parameter-specific information beyond what's in the schema, but with complete schema coverage, the baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('List') and resource ('bank accounts across configured connections'), and specifies what information is returned (account UIDs, IBANs, names, currencies). However, it doesn't explicitly differentiate from sibling tools like 'get_balance' or 'list_transactions', which would require a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'get_balance' or 'list_transactions'. It mentions 'configured connections' but doesn't clarify prerequisites or exclusions, leaving the agent to infer usage context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/elcukro/bank-mcp'

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