Skip to main content
Glama
jmjeong

Whooing MCP

by jmjeong

whooing_calendar

Read-only

Retrieve a daily overview of income and expenses for a month, including transaction counts. Quickly check per-day financial activity.

Instructions

Get daily income/expense overview for a month. Shows per-day transaction counts, income, and expenses.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
start_monthNoStart month in YYYYMM format (e.g., 202604). Defaults to current month.
end_monthNoEnd month in YYYYMM format (e.g., 202604). Defaults to current month.
section_idNoSection ID. Defaults to WHOOING_SECTION_ID env var.

Implementation Reference

  • Registration of the whooing_calendar tool with server.registerTool, including inputSchema with start_month, end_month, and section_id optional parameters.
    // whooing_calendar — Daily income/expense overview
    server.registerTool(
      "whooing_calendar",
      {
        description:
          "Get daily income/expense overview for a month. " +
          "Shows per-day transaction counts, income, and expenses.",
        inputSchema: {
          start_month: z
            .string()
            .optional()
            .describe("Start month in YYYYMM format (e.g., 202604). Defaults to current month."),
          end_month: z
            .string()
            .optional()
            .describe("End month in YYYYMM format (e.g., 202604). 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("calendar.json", {
          section_id: sectionId,
          start_date: startMonth,
          end_date: endMonth,
        });
    
        const text = formatCalendar(
          results as Parameters<typeof formatCalendar>[0]
        );
        return { content: [{ type: "text", text }] };
      }
    );
  • Handler function for whooing_calendar. Calls Whooing API 'calendar.json' with section_id, start_date, end_date, then formats results using formatCalendar.
    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("calendar.json", {
        section_id: sectionId,
        start_date: startMonth,
        end_date: endMonth,
      });
    
      const text = formatCalendar(
        results as Parameters<typeof formatCalendar>[0]
      );
      return { content: [{ type: "text", text }] };
    }
  • Formatting helper function formatCalendar that takes CalendarResults and produces a human-readable daily income/expense overview in Korean with monthly summary and per-day breakdown.
    export function formatCalendar(results: CalendarResults): string {
      const lines: string[] = [];
      let hasDailyRows = false;
    
      const agg = results.aggregate;
      if (agg) {
        lines.push("## 월간 요약");
        lines.push(`- 수입: ${formatAmount(agg.income)}`);
        lines.push(`- 지출: ${formatAmount(agg.expenses)}`);
        if (agg.etc) lines.push(`- 기타: ${formatAmount(agg.etc)}`);
        lines.push("");
      }
    
      const rows = results.rows ?? {};
      const months = Object.keys(rows).sort();
    
      if (months.length === 0) {
        lines.push("해당 기간에 데이터가 없습니다.");
        return lines.join("\n");
      }
    
      const dayNames = ["일", "월", "화", "수", "목", "금", "토"];
    
      for (const month of months) {
        const days = normalizeCalendarDays(rows[month]).filter(
          (d) => Number(d.count ?? 0) > 0
        );
        if (days.length === 0) continue;
    
        const label = `${month.slice(0, 4)}-${month.slice(4, 6)}`;
        lines.push(`### ${label}`);
        for (const d of days) {
          const dateStr = `${String(d.date).slice(0, 4)}-${String(d.date).slice(4, 6)}-${String(d.date).slice(6, 8)}`;
          const dayName = dayNames[Number(d.day)] ?? "";
          const parts: string[] = [];
          if (Number(d.income) > 0) parts.push(`수입 ${formatAmount(Number(d.income))}`);
          if (Number(d.expenses) > 0) parts.push(`지출 ${formatAmount(Number(d.expenses))}`);
          if (Number(d.etc) > 0) parts.push(`기타 ${formatAmount(Number(d.etc))}`);
          lines.push(`- ${dateStr}(${dayName}) ${d.count}건: ${parts.join(", ")}`);
          hasDailyRows = true;
        }
        lines.push("");
      }
    
      if (!hasDailyRows && !agg) {
        lines.push("해당 기간에 데이터가 없습니다.");
      }
    
      return lines.join("\n");
    }
  • Type definitions CalendarDay, CalendarDayRows, and CalendarResults used by the calendar tool's response formatting.
    interface CalendarDay {
      date: string;
      day: number;
      count: number;
      income: number;
      expenses: number;
      etc: number;
    }
    
    type CalendarDayRows = CalendarDay[] | Record<string, CalendarDay>;
    
    interface CalendarResults {
      aggregate?: { income: number; expenses: number; etc: number };
      rows?: Record<string, CalendarDayRows>;
    }
  • Helper function normalizeCalendarDays that normalizes CalendarDayRows (either array or record) into a consistent CalendarDay array.
    function normalizeCalendarDays(days: CalendarDayRows | undefined): CalendarDay[] {
      if (Array.isArray(days)) {
        return days;
      }
      if (days && typeof days === "object") {
        return Object.entries(days).map(([date, value]) => ({
          ...value,
          date: value.date ?? date,
        }));
      }
      return [];
    }
Behavior4/5

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

The description adds value beyond the readOnlyHint annotation by specifying the output includes per-day transaction counts, income, and expenses. No contradictions with annotations. However, it does not disclose potential limitations like date range size or authorization requirements.

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 extremely concise, with two sentences that efficiently convey purpose and output. No wasted words.

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

Completeness4/5

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

Given no output schema, the description adequately explains the return structure (per-day data for a month). It omits details like whether days with no transactions are included, but for a read tool with annotations, it is sufficiently complete.

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 baseline is 3. The description does not add additional meaning beyond what the parameter descriptions already provide (e.g., date format, defaults).

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 uses a specific verb 'Get' and clearly defines the resource as 'daily income/expense overview for a month', including per-day transaction counts, income, and expenses. This clearly distinguishes it from siblings like whooing_monthly_summary or whooing_entries.

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 does not provide any guidance on when to use this tool versus alternatives, nor does it mention any exclusions or prerequisites. For a tool with many similar siblings, this is a significant omission.

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