Skip to main content
Glama
whitebirchio

Monarch Money MCP Server

by whitebirchio

get_monthly_summary

Retrieve monthly financial overview showing income, expenses, and savings for specified year and month.

Instructions

Get monthly financial summary including income, expenses, and savings

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
yearYesYear (e.g., 2024)
monthYesMonth (1-12)

Implementation Reference

  • The actual implementation of getMonthlySummary that fetches transactions for a given month/year and calculates total income, expenses, and net savings
    private async getMonthlySummary(year: number, month: number): Promise<any> {
      try {
        const startDate = `${year}-${month.toString().padStart(2, '0')}-01`;
        const endDate = new Date(year, month, 0).toISOString().split('T')[0]; // Last day of month
    
        const transactions = await this.api.getTransactions({
          startDate,
          endDate,
          limit: 5000,
        });
    
        let totalIncome = 0;
        let totalExpenses = 0;
    
        const incomeTransactions: Transaction[] = [];
        const expenseTransactions: Transaction[] = [];
    
        transactions?.forEach((transaction: Transaction) => {
          if (transaction.amount > 0) {
            totalIncome += transaction.amount;
            incomeTransactions.push(transaction);
          } else {
            totalExpenses += Math.abs(transaction.amount);
            expenseTransactions.push(transaction);
          }
        });
    
        const netSavings = totalIncome - totalExpenses;
    
        return {
          success: true,
          data: {
            month,
            year,
            totalIncome,
            totalExpenses,
            netSavings,
            transactionCount: transactions?.length || 0,
            incomeTransactionCount: incomeTransactions.length,
            expenseTransactionCount: expenseTransactions.length,
          },
          summary: `${year}-${month
            .toString()
            .padStart(2, '0')}: Income $${totalIncome.toFixed(
            2
          )}, Expenses $${totalExpenses.toFixed(2)}, Net $${netSavings.toFixed(
            2
          )}`,
        };
      } catch (error) {
        throw new Error(
          `Failed to get monthly summary: ${
            error instanceof Error ? error.message : 'Unknown error'
          }`
        );
      }
    }
  • Tool definition with input schema requiring year and month parameters
      name: 'get_monthly_summary',
      description:
        'Get monthly financial summary including income, expenses, and savings',
      inputSchema: {
        type: 'object',
        properties: {
          year: {
            type: 'number',
            description: 'Year (e.g., 2024)',
          },
          month: {
            type: 'number',
            description: 'Month (1-12)',
          },
        },
        required: ['year', 'month'],
      },
    },
  • src/tools.ts:227-228 (registration)
    Tool registration case in executeTool switch statement that routes calls to getMonthlySummary implementation
    case 'get_monthly_summary':
      return await this.getMonthlySummary(args.year, args.month);
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states what data is included but doesn't disclose behavioral traits such as whether this is a read-only operation, requires authentication, has rate limits, or how data is sourced (e.g., from transactions or accounts). This leaves significant gaps for a financial tool.

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 with zero waste. It front-loads the purpose clearly and uses straightforward language, making it appropriately sized for the tool's complexity.

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 annotations and no output schema, the description is incomplete. It doesn't explain return values (e.g., format of summary data), error conditions, or dependencies on other tools like 'get_transactions'. For a financial summary tool with 2 parameters, this lacks necessary context for effective use.

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%, with both parameters ('year' and 'month') well-documented in the schema. The description adds no additional parameter semantics beyond implying temporal filtering, which is already covered. Baseline 3 is appropriate as the schema does the heavy lifting.

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 ('Get') and the resource ('monthly financial summary') with specific components (income, expenses, savings). It distinguishes from most siblings like 'get_account_balance' or 'get_transactions' by focusing on aggregated monthly data, though it doesn't explicitly differentiate from 'get_budget_summary' which might overlap.

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 like 'get_budget_summary' or 'get_spending_by_category'. The description implies usage for monthly summaries but doesn't specify prerequisites, exclusions, or comparative contexts with sibling tools.

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