Skip to main content
Glama
justmytwospence

ynab-mcp

List Budget Months

list_months
Read-only

Retrieve budget month details including income, budgeted amounts, activity, and ready-to-assign funds for YNAB financial planning.

Instructions

[1 API call] List all budget months for a budget, showing income, budgeted, activity, and ready to assign

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
budget_idNoBudget ID or 'last-used'last-used
last_knowledge_of_serverNoDelta request token

Implementation Reference

  • The handler function that executes the logic for the "list_months" tool. It calls the YNAB client to fetch plan months and formats the output.
    }, async ({ budget_id, last_knowledge_of_server }) => {
      try {
        const response = await getClient().months.getPlanMonths(budget_id, last_knowledge_of_server);
        const months = response.data.months;
        const lines = months.map((m) =>
          `- ${m.month}: Income ${formatCurrency(m.income)} | Budgeted ${formatCurrency(m.budgeted)} | Activity ${formatCurrency(m.activity)} | To Be Budgeted ${formatCurrency(m.to_be_budgeted)}`
        );
        return textResult(
          `Budget Months (${months.length}):\n${lines.join("\n")}\n\nServer Knowledge: ${response.data.server_knowledge}`
        );
      } catch (e: any) {
        return errorResult(e.message);
      }
    });
  • The registration of the "list_months" tool, including its schema and description.
    server.registerTool("list_months", {
      title: "List Budget Months",
      description: "[1 API call] List all budget months for a budget, showing income, budgeted, activity, and ready to assign",
      inputSchema: {
        budget_id: z.string().default("last-used").describe("Budget ID or 'last-used'"),
        last_knowledge_of_server: z.number().optional().describe("Delta request token"),
      },
      annotations: { readOnlyHint: true },
Behavior4/5

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

Annotations declare readOnlyHint=true, which the description aligns with by describing a listing operation. The description adds valuable context beyond annotations: it specifies the API call cost ('[1 API call]'), discloses the data fields returned (income, budgeted, activity, ready to assign), and hints at server-state awareness ('last_knowledge_of_server' in schema). However, it doesn't detail pagination, rate limits, or error behaviors.

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 that front-loads key information (API call cost, action, resource, data fields). Every element earns its place, with no redundant or vague phrasing, making it optimally concise and well-structured for quick comprehension.

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 (listing with filtering), rich annotations (readOnlyHint), and full schema coverage, the description is largely complete. It adds useful behavioral context (API cost, returned fields) but lacks output format details (no output schema) and doesn't cover edge cases like empty results. Slightly more detail on response structure would make it fully 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 parameters are fully documented in the schema. The description adds no parameter-specific information beyond implying 'budget_id' usage ('for a budget'). It doesn't explain parameter interactions or provide examples, so it meets the baseline for high schema coverage without adding extra value.

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 clearly states the specific action ('List all budget months for a budget') and the resource ('budget months'), distinguishing it from siblings like 'get_month' (single month) and 'list_budgets' (budgets themselves). It also specifies the data fields shown (income, budgeted, activity, ready to assign), making the purpose highly specific and differentiated.

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 context by mentioning 'for a budget' and the data fields, but provides no explicit guidance on when to use this tool versus alternatives like 'get_month' (single month) or 'list_month_transactions' (transactions within months). It also doesn't mention prerequisites or exclusions, leaving usage decisions to inference.

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