Skip to main content
Glama
jmjeong

Whooing MCP

by jmjeong

whooing_monthly_summary

Read-only

Retrieve monthly income, expenses, net amount, and transaction counts for a specified month range to analyze financial trends.

Instructions

Get month-by-month income, expense, net amount, and transaction count for a month range.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
start_monthNoStart month in YYYYMM format. Defaults to current month.
end_monthNoEnd month in YYYYMM format. Defaults to current month.
section_idNoSection ID. Defaults to WHOOING_SECTION_ID env var.

Implementation Reference

  • Registration of the whooing_monthly_summary tool on the MCP server, including its input schema (start_month, end_month, section_id) and the handler that calls report_summary.json API and formats results via formatReportMonthlySummary.
    // whooing_monthly_summary — Multi-month income/expense summary
    server.registerTool(
      "whooing_monthly_summary",
      {
        description:
          "Get month-by-month income, expense, net amount, and transaction count for a month range.",
        inputSchema: {
          start_month: z
            .string()
            .regex(/^\d{6}$/)
            .optional()
            .describe("Start month in YYYYMM format. Defaults to current month."),
          end_month: z
            .string()
            .regex(/^\d{6}$/)
            .optional()
            .describe("End month in YYYYMM format. Defaults to current month."),
          section_id: z
            .string()
            .optional()
            .describe("Section ID. Defaults to WHOOING_SECTION_ID env var."),
        },
        annotations: { readOnlyHint: true },
      },
      async (args) => {
        const sectionId = args.section_id ?? client.defaultSectionId;
        const now = new Date();
        const currentMonth =
          `${now.getFullYear()}${String(now.getMonth() + 1).padStart(2, "0")}`;
        const startMonth = args.start_month ?? currentMonth;
        const endMonth = args.end_month ?? currentMonth;
    
        const results = await client.apiGet("report_summary.json", {
          section_id: sectionId,
          start_date: startMonth,
          end_date: endMonth,
          rows_type: "month",
          account: "expenses,income",
        });
    
        const text = formatReportMonthlySummary(
          results as Parameters<typeof formatReportMonthlySummary>[0]
        );
        return { content: [{ type: "text", text }] };
      }
    );
  • The handler function for whooing_monthly_summary. Resolves section ID and month range, then calls client.apiGet('report_summary.json') with rows_type:'month' and account:'expenses,income', and formats the response using formatReportMonthlySummary.
    async (args) => {
      const sectionId = args.section_id ?? client.defaultSectionId;
      const now = new Date();
      const currentMonth =
        `${now.getFullYear()}${String(now.getMonth() + 1).padStart(2, "0")}`;
      const startMonth = args.start_month ?? currentMonth;
      const endMonth = args.end_month ?? currentMonth;
    
      const results = await client.apiGet("report_summary.json", {
        section_id: sectionId,
        start_date: startMonth,
        end_date: endMonth,
        rows_type: "month",
        account: "expenses,income",
      });
    
      const text = formatReportMonthlySummary(
        results as Parameters<typeof formatReportMonthlySummary>[0]
      );
      return { content: [{ type: "text", text }] };
    }
  • Input schema for whooing_monthly_summary: optional start_month (YYYYMM), end_month (YYYYMM), and section_id, all validated with zod.
    inputSchema: {
      start_month: z
        .string()
        .regex(/^\d{6}$/)
        .optional()
        .describe("Start month in YYYYMM format. Defaults to current month."),
      end_month: z
        .string()
        .regex(/^\d{6}$/)
        .optional()
        .describe("End month in YYYYMM format. Defaults to current month."),
      section_id: z
        .string()
        .optional()
        .describe("Section ID. Defaults to WHOOING_SECTION_ID env var."),
    },
  • Helper types (ReportSummaryRow, ReportSummaryResults) and the formatReportMonthlySummary function that formats the API response into a human-readable month-by-month summary of income, expenses, and net profit in Korean.
    interface ReportSummaryRow {
      date?: string;
      income?: number;
      expenses?: number;
      net_income?: number;
    }
    
    interface ReportSummaryResults {
      rows?: Record<string, ReportSummaryRow>;
    }
    
    export function formatReportMonthlySummary(results: ReportSummaryResults): string {
      const rows = results.rows ?? {};
      const months = Object.keys(rows).sort();
    
      if (months.length === 0) {
        return "해당 기간에 월별 요약 데이터가 없습니다.";
      }
    
      const lines: string[] = [];
      lines.push("## 월별 요약");
      lines.push("");
    
      for (const month of months) {
        const row = rows[month] ?? {};
        const income = Number(row.income ?? 0);
        const expenses = Number(row.expenses ?? 0);
        const netIncome = Number(row.net_income ?? income - expenses);
        const label = `${month.slice(0, 4)}-${month.slice(4, 6)}`;
        lines.push(
          `- ${label}: ` +
            `수입 ${formatAmount(income)}, ` +
            `지출 ${formatAmount(expenses)}, ` +
            `순이익 ${formatAmount(netIncome)}`
        );
      }
    
      return lines.join("\n");
    }
  • The formatAmount helper used by formatReportMonthlySummary to format monetary values with Korean locale and '원' suffix.
    function formatAmount(amount: number | string | null | undefined): string {
      const numeric = Number(amount ?? 0);
      if (!Number.isFinite(numeric)) {
        return `${amount ?? 0}원`;
      }
      return numeric.toLocaleString("ko-KR") + "원";
    }
Behavior3/5

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

Annotations already declare readOnlyHint=true. Description adds that the tool returns aggregated data for a month range, which is consistent. However, it doesn't disclose details like response format, ordering, or handling of missing months. With annotations covering safety, description provides minimal additional behavioral context.

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?

Single sentence of 12 words, front-loaded with the key purpose. No fluff; every word contributes value. Excellent conciseness.

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?

No output schema, so description must explain return data. It lists fields (income, expense, net amount, transaction count) but doesn't specify structure (array of objects per month) or default behavior for missing data. Adequate for a simple read tool but could be more explicit.

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?

Input schema has 100% description coverage, so schema already defines parameters. Description mentions 'month range' which aligns with start_month/end_month but adds no new meaning beyond the schema. Baseline 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?

Description clearly states the tool retrieves month-by-month income, expense, net amount, and transaction count for a month range. This specific verb+resource combination distinguishes it from sibling tools like whooing_balance or whooing_pl which provide different summaries.

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

Usage Guidelines3/5

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

The description implies usage for obtaining monthly summaries over a range, but lacks explicit guidance on when to use this tool versus alternatives (e.g., whooing_entries for raw transactions, whooing_balance for a single period). No when-not-to-use or alternative suggestions.

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/jmjeong/whooing-mcp'

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