Skip to main content
Glama
justmytwospence

ynab-mcp

Get Account

get_account
Read-only

Retrieve detailed information for a specific YNAB account, including balance and transaction history, to monitor financial status.

Instructions

[1 API call] Get details for a single account

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
budget_idNoBudget ID or 'last-used'last-used
account_idYesThe account ID

Implementation Reference

  • The `get_account` tool handler implementation, including input schema definition and the logic for fetching account details from the YNAB client.
    server.registerTool("get_account", {
      title: "Get Account",
      description: "[1 API call] Get details for a single account",
      inputSchema: {
        budget_id: z.string().default("last-used").describe("Budget ID or 'last-used'"),
        account_id: z.string().describe("The account ID"),
      },
      annotations: { readOnlyHint: true },
    }, async ({ budget_id, account_id }) => {
      try {
        const response = await getClient().accounts.getAccountById(budget_id, account_id);
        const a = response.data.account;
        const lines = [
          `Name: ${a.name}`,
          `Type: ${a.type}`,
          `Balance: ${formatCurrency(a.balance)}`,
          `Cleared Balance: ${formatCurrency(a.cleared_balance)}`,
          `Uncleared Balance: ${formatCurrency(a.uncleared_balance)}`,
          `On Budget: ${a.on_budget}`,
          `Closed: ${a.closed}`,
          `Note: ${a.note ?? "None"}`,
          `ID: ${a.id}`,
        ];
        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?

Annotations provide readOnlyHint=true, indicating a safe read operation. The description adds value by specifying '[1 API call]', which hints at performance or rate limit considerations not covered by annotations. However, it lacks details on error handling, response format, or other behavioral traits like pagination or authentication needs.

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 only one sentence, front-loaded with the key information (API call count and purpose). There's no wasted verbiage, and it efficiently communicates the core functionality without unnecessary elaboration.

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 simplicity (2 parameters, read-only, no output schema), the description is minimally adequate. It covers the basic action and API call count but lacks context on output structure, error cases, or integration with sibling tools. With annotations providing safety info, it's complete enough for a straightforward read operation but could be more informative.

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 clear documentation for both parameters (budget_id and account_id). The description doesn't add any semantic details beyond what's in the schema, such as explaining the significance of 'last-used' for budget_id or how account_id is sourced. Baseline 3 is appropriate as the schema handles parameter documentation adequately.

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 verb ('Get') and resource ('details for a single account'), making the purpose specific. However, it doesn't distinguish this tool from sibling tools like 'list_accounts' or 'get_user', which could also retrieve account-related information, leaving some ambiguity about when to use 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. With siblings like 'list_accounts' (for multiple accounts) and 'get_user' (possibly for user account details), there's no indication of context, prerequisites, or exclusions, leaving the agent to infer usage based on tool names 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