Skip to main content
Glama

chase_transactions

Retrieve recent transactions for a specific Chase account. Provide an account ID and optional limit to get a list of recent transactions.

Instructions

Get recent transactions for an account.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
accountIdYesThe account ID to get transactions for
limitNoMaximum number of transactions to return (default: 25)

Implementation Reference

  • src/index.ts:92-110 (registration)
    Tool registration for 'chase_transactions' - defines the tool name, description, and input schema requiring accountId (string) with optional limit (number, default 25).
    {
      name: "chase_transactions",
      description:
        "Get recent transactions for an account.",
      inputSchema: {
        type: "object",
        properties: {
          accountId: {
            type: "string",
            description: "The account ID to get transactions for",
          },
          limit: {
            type: "number",
            description: "Maximum number of transactions to return (default: 25)",
          },
        },
        required: ["accountId"],
      },
    },
  • Handler that executes the 'chase_transactions' tool - extracts accountId and limit from arguments, calls getTransactions() from browser.ts, and returns structured JSON response with isError flag.
    case "chase_transactions": {
      const { accountId, limit } = args as { accountId: string; limit?: number };
      const result = await getTransactions(accountId, limit);
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(result),
          },
        ],
        isError: !result.success,
      };
    }
  • The getTransactions() helper function - navigates to Chase dashboard, clicks the target account tile, scrapes transaction rows from the DOM (date, description, amount, type, category, pending status), and returns up to the specified limit.
    export async function getTransactions(
      accountId: string,
      limit: number = 25
    ): Promise<{ success: boolean; transactions?: Transaction[]; error?: string }> {
      try {
        const p = await getPage();
        
        // Navigate to account details
        await p.goto(`${CHASE_BASE_URL}/web/auth/dashboard`, { waitUntil: "networkidle" });
        await p.waitForTimeout(1000);
        
        // Click on the account
        const accountTile = await p.$(`[data-account-id="${accountId}"], .account-tile:nth-child(${parseInt(accountId.replace('account-', '')) + 1})`);
        if (accountTile) {
          await accountTile.click();
          await p.waitForNavigation({ waitUntil: "networkidle" }).catch(() => {});
        }
        
        await p.waitForTimeout(2000);
        
        const transactions = await p.$$eval(
          '.transaction-row, .activity-row, [data-testid="transaction"]',
          (elements, maxItems) =>
            elements.slice(0, maxItems).map((el, index) => {
              const dateEl = el.querySelector('.transaction-date, .date, td:first-child');
              const descEl = el.querySelector('.transaction-description, .description, .merchant-name');
              const amountEl = el.querySelector('.transaction-amount, .amount');
              const pendingEl = el.querySelector('.pending, .pending-badge');
              const categoryEl = el.querySelector('.category, .transaction-category');
              
              const amountText = amountEl?.textContent?.trim() || '0';
              const amount = Math.abs(parseFloat(amountText.replace(/[$,]/g, ''))) || 0;
              const isCredit = amountText.includes('+') || el.classList.contains('credit');
              
              return {
                id: el.getAttribute('data-transaction-id') || `txn-${index}`,
                date: dateEl?.textContent?.trim() || '',
                description: descEl?.textContent?.trim() || 'Unknown',
                amount,
                type: isCredit ? 'credit' : 'debit' as 'credit' | 'debit',
                category: categoryEl?.textContent?.trim() || undefined,
                pending: !!pendingEl,
              };
            }),
          limit
        );
        
        return { success: true, transactions };
      } catch (error) {
        return {
          success: false,
          error: error instanceof Error ? error.message : "Failed to get transactions",
        };
      }
    }
  • Transaction interface type definition used as the return type for the getTransactions function - defines id, date, description, amount, type (credit/debit), category, pending, and merchant fields.
    export interface Transaction {
      id: string;
      date: string;
      description: string;
      amount: number;
      type: "credit" | "debit";
      category?: string;
      pending: boolean;
      merchant?: string;
    }
Behavior2/5

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

No annotations exist, and the description only says 'Get recent transactions' without disclosing behavior like ordering, default limit, pagination, or error handling. The agent lacks behavioral context beyond a basic read.

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

Conciseness3/5

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

The description is a single sentence of 5 words, efficient but overly terse. It lacks detail on what 'recent' means or the return format, which could be added without excessive length.

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

Completeness2/5

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

Given no output schema and no annotations, the description is insufficient for a tool with two parameters. It omits return value details, pagination, and ordering. Sibling tools are unrelated, but no usage context is provided.

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?

Both parameters are described in the schema with 100% coverage. The description adds minimal extra meaning; 'recent' implies a filter but no specifics. Baseline 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 verb 'Get' and resource 'transactions' with the scope 'recent' and 'for an account'. It effectively distinguishes from siblings like chase_balance and chase_bills, though 'recent' could be more precise.

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 is provided on when to use this tool versus alternatives (e.g., chase_statements, chase_transfers). The description does not mention prerequisites or 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/markswendsen-code/mcp-chase'

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