Skip to main content
Glama
justmytwospence

ynab-mcp

Get Month Category

get_month_category
Read-only

Retrieve a category's budget details for a specific month from YNAB to track spending and manage financial allocations.

Instructions

[1 API call] Get a category's budget details for a specific 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'
category_idYesThe category ID

Implementation Reference

  • The tool "get_month_category" is registered here with its input schema and handler function, which calls the YNAB client to retrieve budget category details for a specific month.
    server.registerTool("get_month_category", {
      title: "Get Month Category",
      description: "[1 API call] Get a category's budget details for a specific 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'"),
        category_id: z.string().describe("The category ID"),
      },
      annotations: { readOnlyHint: true },
    }, async ({ budget_id, month, category_id }) => {
      try {
        const response = await getClient().categories.getMonthCategoryById(budget_id, month, category_id);
        const c = response.data.category;
        const lines = [
          `Category: ${c.name} (${month})`,
          `Budgeted: ${formatCurrency(c.budgeted)}`,
          `Activity: ${formatCurrency(c.activity)}`,
          `Balance: ${formatCurrency(c.balance)}`,
          `Goal Type: ${c.goal_type ?? "None"}`,
          `Goal Target: ${c.goal_target != null ? formatCurrency(c.goal_target) : "None"}`,
        ];
        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 description adds '[1 API call]' which hints at performance/rate limit considerations, useful context beyond the readOnlyHint annotation. However, it doesn't disclose other behavioral traits like error handling, response format, or data freshness. With annotations covering safety (read-only), the description provides some added value but not comprehensive behavioral insight.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads key information (API call count and core purpose). It avoids redundancy but could be slightly more structured (e.g., separating behavioral notes from purpose).

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?

Given the tool's moderate complexity (3 parameters, read-only, no output schema), the description is minimally adequate. It states the purpose and hints at behavior but lacks details on output format, error cases, or integration with sibling tools. With annotations covering safety, it meets basic needs but leaves gaps for an agent to infer.

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 parameters are fully documented in the schema. The description doesn't add any meaning beyond the schema (e.g., it doesn't explain interactions between parameters or special cases). Baseline 3 is appropriate when the schema handles all parameter documentation.

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 resource ('a category's budget details for a specific month'), making the purpose understandable. However, it doesn't explicitly differentiate from sibling tools like 'get_category' or 'get_month', which provide similar category or month-level data, leaving some ambiguity about when to choose this specific tool.

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 like 'get_category' (for general category info) or 'get_month' (for month-level overview). It mentions the scope ('for a specific month') but lacks explicit comparisons or prerequisites, leaving the agent to infer usage from context alone.

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