Skip to main content
Glama
Meh-S-Eze

MCP YNAB Server

get_transactions

Retrieve recent transactions for a specific account and budget using the MCP YNAB Server. Input budget_id and account_id to access transaction data.

Instructions

Get recent transactions for a specific account in a specific budget.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
account_idYes
budget_idYes

Implementation Reference

  • The handler function for the 'get_transactions' MCP tool. It fetches transactions for a given budget and account since the 1st of the current month using the YNAB API, formats them into a markdown table, and returns the result.
    @mcp.tool()
    async def get_transactions(budget_id: str, account_id: str) -> str:
        """Get recent transactions for a specific account in a specific budget."""
        async with await get_ynab_client() as client:
            transactions_api = TransactionsApi(client)
            all_transactions: List[TransactionDetail] = []
            since_date = datetime.now().replace(day=1).date()
            response = transactions_api.get_transactions_by_account(
                budget_id, account_id, since_date=since_date
            )
            all_transactions.extend(response.data.transactions)
    
            markdown = "# Recent Transactions\n\n"
            if not all_transactions:
                return markdown + "_No recent transactions found._\n"
    
            headers = ["ID", "Date", "Amount", "Payee Name", "Category Name", "Memo"]
            align = ["left", "left", "right", "left", "left", "left"]
            rows = []
    
            for txn in all_transactions:
                amount_str = f"${txn.amount / 1000:,.2f}"
                rows.append(
                    [
                        txn.id,
                        txn.var_date.strftime("%Y-%m-%d"),
                        amount_str,
                        txn.payee_name or "N/A",
                        txn.category_name or "N/A",
                        txn.memo or "",
                    ]
                )
    
            markdown += _build_markdown_table(rows, headers, align)
            return markdown
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states 'Get recent transactions' but doesn't disclose behavioral traits like what 'recent' means (time range, limit), whether it's paginated, requires authentication, or has rate limits. For a read operation with zero annotation coverage, this leaves significant gaps.

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 the core purpose with zero wasted words. Every part ('Get recent transactions for a specific account in a specific budget') directly contributes to understanding the tool's function.

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 no annotations, no output schema, and low schema coverage (0%), the description is incomplete. It lacks details on return values (e.g., transaction format, fields), error handling, and behavioral constraints, making it inadequate for a tool with two required parameters and potential complexity in financial data retrieval.

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 0%, so the description must compensate. It mentions 'account_id' and 'budget_id' implicitly by referring to 'specific account' and 'specific budget', adding basic meaning. However, it doesn't explain parameter formats, valid values, or relationships, leaving the schema's undocumented parameters only partially clarified.

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 target resource ('recent transactions'), specifying scope for 'a specific account in a specific budget'. It distinguishes from siblings like 'get_accounts' or 'get_budgets' by focusing on transactions, but doesn't explicitly differentiate from '_find_transaction_by_id' or 'get_transactions_needing_attention'.

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?

No guidance on when to use this tool versus alternatives like '_find_transaction_by_id' (likely for specific transactions) or 'get_transactions_needing_attention' (likely filtered). The description implies usage when needing recent transactions for an account/budget pair, but lacks explicit when-not scenarios or prerequisites.

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