Skip to main content
Glama
elcukro

bank-mcp

by elcukro

list_accounts

Retrieve all bank accounts from connected financial institutions. Returns account UIDs, IBANs, names, and currencies for one or multiple connections.

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 for the list_accounts tool. Loads config, iterates over connections (or a specific one), calls provider.listAccounts() for each, caches results, and returns aggregated bank accounts.
    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 for list_accounts input: optional connectionId string. If omitted, queries all connections.
    export const listAccountsSchema = z.object({
      connectionId: z
        .string()
        .optional()
        .describe("Connection ID to query. If omitted, queries all connections."),
    });
  • src/server.ts:24-30 (registration)
    Registration of the 'list_accounts' tool in the server's TOOLS array with name, description, and inputSchema.
    const TOOLS = [
      {
        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:60-60 (registration)
    Handler dispatch for list_accounts in the server's handlers record. Parses args with schema and calls the main handler.
    list_accounts: (args) => listAccounts(listAccountsSchema.parse(args)),
  • Abstract method definition for listAccounts in the base BankProvider class, defining the contract all providers must implement.
    /** Fetch all accounts accessible via this connection. */
    abstract listAccounts(
      config: Record<string, unknown>,
Behavior2/5

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

No annotations exist, so the description must cover behavioral traits. It does not mention that this is a read-only operation, nor any potential performance considerations, rate limits, or required permissions.

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?

Two short sentences: one describing the action and scope, one describing the output. No redundant information, efficient and front-loaded.

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 no output schema and no annotations, the description is adequate but lacks usage guidelines and behavioral context. It covers the basic purpose and return fields but not when or how to use effectively.

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?

The schema covers 100% of the single parameter with a clear description. The tool description adds no additional semantics beyond stating it lists accounts, so baseline score of 3 is appropriate.

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

Purpose5/5

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

The description clearly states the tool lists all bank accounts across configured connections and specifies the returned fields (UIDs, IBANs, names, currencies). It distinguishes from siblings like get_balance or list_transactions by focusing on account listing.

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?

No guidance on when to use this tool versus alternatives (e.g., get_balance for a single account). No explicit conditions or prerequisites provided.

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