Skip to main content
Glama
justmytwospence

ynab-mcp

Get Budget Month

get_month
Read-only

Retrieve detailed budget month information including all category balances from YNAB. Specify a month in YYYY-MM-DD format or use 'current' for the present month.

Instructions

[1 API call] Get detailed info for a single budget month including all category balances. Use 'current' for the current month.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
budget_idNoBudget ID or 'last-used'last-used
monthYesMonth in YYYY-MM-DD format (first of month) or 'current'

Implementation Reference

  • The "get_month" tool handler, which retrieves detailed budget month information including category balances from the YNAB API.
    server.registerTool("get_month", {
      title: "Get Budget Month",
      description: "[1 API call] Get detailed info for a single budget month including all category balances. Use 'current' for the current month.",
      inputSchema: {
        budget_id: z.string().default("last-used").describe("Budget ID or 'last-used'"),
        month: z.string().describe("Month in YYYY-MM-DD format (first of month) or 'current'"),
      },
      annotations: { readOnlyHint: true },
    }, async ({ budget_id, month }) => {
      try {
        const response = await getClient().months.getPlanMonth(budget_id, month);
        const m = response.data.month;
        const lines = [
          `Month: ${m.month}`,
          `Income: ${formatCurrency(m.income)}`,
          `Budgeted: ${formatCurrency(m.budgeted)}`,
          `Activity: ${formatCurrency(m.activity)}`,
          `To Be Budgeted: ${formatCurrency(m.to_be_budgeted)}`,
          `Age of Money: ${m.age_of_money ?? "N/A"} days`,
        ];
        if (m.categories) {
          lines.push(`\nCategories:`);
          for (const c of m.categories) {
            if (c.hidden) continue;
            lines.push(`  - ${c.name}: Budgeted ${formatCurrency(c.budgeted)} | Activity ${formatCurrency(c.activity)} | Balance ${formatCurrency(c.balance)}`);
          }
        }
        return textResult(lines.join("\n"));
      } catch (e: any) {
        return errorResult(e.message);
      }
    });
Behavior3/5

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

The annotation 'readOnlyHint: true' already indicates this is a safe read operation. The description adds value by specifying '[1 API call]' (implying a single request without pagination) and clarifying that it returns 'detailed info... including all category balances,' which provides context beyond the annotation. However, it doesn't disclose other behavioral traits like error conditions, rate limits, or authentication needs, keeping the score at a baseline level.

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 highly concise and front-loaded, consisting of two sentences that efficiently convey key information: the API call count and the tool's purpose with a usage tip. Every sentence earns its place without redundancy or unnecessary details, making it easy to parse and understand quickly.

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 the tool's moderate complexity (2 parameters, read-only operation), the description is reasonably complete. It covers the purpose, API call count, and a usage tip. However, with no output schema, it doesn't describe the return format (e.g., structure of 'detailed info'), which could be helpful for an agent. The annotations provide safety context, but the description could add more about response behavior to achieve a score of 5.

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 ('budget_id' and 'month') well-documented in the schema. The description adds minimal semantics by mentioning 'Use 'current' for the current month,' which slightly elaborates on the 'month' parameter but doesn't provide significant additional meaning beyond what the schema already covers. This meets the baseline score of 3 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 tool's purpose: 'Get detailed info for a single budget month including all category balances.' It specifies the verb ('Get'), resource ('budget month'), and scope ('detailed info... including all category balances'). However, it doesn't explicitly differentiate from sibling tools like 'get_month_category' or 'list_months', which prevents a score of 5.

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 provides some usage guidance by mentioning 'Use 'current' for the current month,' which implies a common use case. However, it doesn't explicitly state when to use this tool versus alternatives like 'get_month_category' for specific category details or 'list_months' for multiple months, nor does it mention prerequisites or exclusions. This leaves usage context implied rather than explicit.

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/justmytwospence/ynab-mcp'

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