Skip to main content
Glama
whitebirchio

Monarch Money MCP Server

by whitebirchio

get_account_snapshots

Retrieve balance history for a specific account over a defined period to track financial changes and analyze account performance.

Instructions

Get balance history for a specific account over time

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
accountIdYesThe ID of the account
startDateNoStart date in YYYY-MM-DD format
endDateNoEnd date in YYYY-MM-DD format

Implementation Reference

  • The main handler implementation for get_account_snapshots that calls the API and formats the response with success status, data, and summary
    private async getAccountSnapshots(
      accountId: string,
      startDate?: string,
      endDate?: string
    ): Promise<any> {
      try {
        const snapshots = await this.api.getAccountSnapshots(
          accountId,
          startDate,
          endDate
        );
    
        return {
          success: true,
          data: snapshots,
          summary: `Retrieved ${snapshots?.length || 0} account snapshots`,
        };
      } catch (error) {
        throw new Error(
          `Failed to get account snapshots: ${
            error instanceof Error ? error.message : 'Unknown error'
          }`
        );
      }
  • src/tools.ts:161-180 (registration)
    Tool registration including name, description, and input schema with accountId, startDate, and endDate parameters
    name: 'get_account_snapshots',
    description: 'Get balance history for a specific account over time',
    inputSchema: {
      type: 'object',
      properties: {
        accountId: {
          type: 'string',
          description: 'The ID of the account',
        },
        startDate: {
          type: 'string',
          description: 'Start date in YYYY-MM-DD format',
        },
        endDate: {
          type: 'string',
          description: 'End date in YYYY-MM-DD format',
        },
      },
      required: ['accountId'],
    },
  • src/tools.ts:233-238 (registration)
    Switch case that routes the tool execution to the getAccountSnapshots handler with the provided arguments
    case 'get_account_snapshots':
      return await this.getAccountSnapshots(
        args.accountId,
        args.startDate,
        args.endDate
      );
  • API helper method that constructs and executes the GraphQL query to fetch account snapshots from the Monarch Money API
    async getAccountSnapshots(
      accountId: string,
      startDate?: string,
      endDate?: string
    ): Promise<any[]> {
      let filters = `accountId: "${accountId}"`;
      if (startDate) {
        filters += `, startDate: "${startDate}"`;
      }
      if (endDate) {
        filters += `, endDate: "${endDate}"`;
      }
    
      const query = `
        query GetAccountSnapshots {
          accountSnapshots(filters: {${filters}}) {
            date
            balance
            signedBalance
          }
        }
      `;
    
      try {
        const data: any = await this.graphQLClient.request(query);
        return data.accountSnapshots || [];
      } catch (error: any) {
        if (
          error.message.includes('401') ||
          error.message.includes('unauthorized')
        ) {
          throw new Error(
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions retrieving 'balance history' but doesn't specify whether this includes only end-of-day balances or intraday changes, what timezone is used for dates, whether data is real-time or cached, or any rate limits/authentication requirements. For a historical data tool with zero annotation coverage, this leaves significant behavioral 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 communicates the core functionality without unnecessary words. It's appropriately sized for a straightforward data retrieval tool and front-loads the essential information. Every word earns its place in this concise formulation.

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 3-parameter read-only tool with no output schema, the description is minimally adequate. It states what data is retrieved but doesn't describe the return format (list of snapshots? time series?), granularity (daily? hourly?), or what fields are included in each snapshot. With no annotations and no output schema, more detail about the response structure would be helpful for agent understanding.

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 all three parameters (accountId, startDate, endDate). The description adds no additional parameter semantics beyond what's in the schema - it doesn't explain what constitutes a 'balance history' entry, whether dates are inclusive, or what happens when dates are omitted. This meets the baseline for high schema coverage.

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 'balance history for a specific account over time', making the purpose unambiguous. It specifies the temporal aspect ('over time') which distinguishes it from static balance tools like 'get_account_balance'. However, it doesn't explicitly differentiate from other historical tools like 'get_transactions' or 'get_monthly_summary', preventing a perfect score.

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. With sibling tools like 'get_account_balance' (current balance), 'get_transactions' (detailed activity), and 'get_monthly_summary' (aggregated history), there's no indication of when this balance history tool is preferred. The description only states what it does, not when it's appropriate.

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/whitebirchio/monarch-mcp'

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