Skip to main content
Glama
Meh-S-Eze

MCP YNAB Server

get_account_balance

Retrieve the current balance in dollars for a specific YNAB account by providing the account ID, enabling users to quickly access financial data for budgeting and planning.

Instructions

Get the current balance of a YNAB account (in dollars).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
account_idYes

Implementation Reference

  • The handler function decorated with @mcp.tool(), which registers the tool and defines its schema via the function signature (account_id: str -> float). It fetches the first budget, retrieves the account by ID, and returns the balance in dollars (converting from YNAB's milliunits).
    @mcp.tool()
    async def get_account_balance(account_id: str) -> float:
        """Get the current balance of a YNAB account (in dollars)."""
        async with await get_ynab_client() as client:
            accounts_api = AccountsApi(client)
            budgets_api = BudgetsApi(client)
            budgets_response = budgets_api.get_budgets()
            budget_id = budgets_response.data.budgets[0].id
    
            response = accounts_api.get_account_by_id(budget_id, account_id)
            return float(response.data.account.balance) / 1000
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action ('Get') but lacks details on permissions, rate limits, error handling, or return format (e.g., numeric value, currency format). For a financial tool with zero annotation coverage, this is a significant gap in transparency.

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 with zero waste. It is appropriately sized and front-loaded, clearly stating the tool's purpose without unnecessary details. Every word earns its place, making it highly concise and well-structured.

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

Completeness2/5

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

Given the complexity of a financial balance tool with no annotations, 0% schema coverage, and no output schema, the description is incomplete. It lacks details on behavioral traits, parameter semantics, and return values, failing to provide sufficient context for effective tool use by an AI agent.

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?

The schema description coverage is 0%, so the description must compensate. It implies the parameter is an account ID but doesn't specify format, source (e.g., from get_accounts), or validation rules. The description adds minimal meaning beyond the schema's property name, resulting in a baseline score due to incomplete 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 verb ('Get') and resource ('current balance of a YNAB account'), specifying the unit ('in dollars'). It distinguishes from siblings like get_accounts (which lists accounts) and get_transactions (which retrieves transaction data). However, it doesn't explicitly differentiate from all siblings, such as get_budgets, which might also involve financial data.

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. It doesn't mention prerequisites (e.g., needing an account ID from get_accounts), exclusions, or comparisons to siblings like get_transactions for transaction-level details. Usage is implied but not explicitly stated.

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

Related 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/Meh-S-Eze/ynab-mcp-client2'

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