Skip to main content
Glama
dgalarza

YNAB MCP Server

by dgalarza

get_scheduled_transactions

Retrieve all scheduled transactions from your YNAB budget to manage upcoming payments and maintain financial planning accuracy.

Instructions

Get all scheduled transactions.

Args:
    budget_id: The ID of the budget (use 'last-used' for default budget)

Returns:
    JSON string with list of scheduled transactions

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
budget_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • MCP tool handler for get_scheduled_transactions. Registers the tool and delegates to YNABClient instance.
    @mcp.tool()
    async def get_scheduled_transactions(budget_id: str) -> str:
        """Get all scheduled transactions.
    
        Args:
            budget_id: The ID of the budget (use 'last-used' for default budget)
    
        Returns:
            JSON string with list of scheduled transactions
        """
        client = get_ynab_client()
        result = await client.get_scheduled_transactions(budget_id)
        return json.dumps(result, indent=2)
  • Core implementation in YNABClient that fetches scheduled transactions from YNAB API, formats the response, and handles errors.
    async def get_scheduled_transactions(self, budget_id: str) -> list[dict[str, Any]]:
        """Get all scheduled transactions.
    
        Args:
            budget_id: The budget ID or 'last-used'
    
        Returns:
            List of scheduled transaction dictionaries
        """
        try:
            url = f"{self.api_base_url}/budgets/{budget_id}/scheduled_transactions"
    
            result = await self._make_request_with_retry("get", url)
    
            scheduled_txns = []
            for txn in result["data"]["scheduled_transactions"]:
                scheduled_txns.append(
                    {
                        "id": txn["id"],
                        "date_first": txn.get("date_first"),
                        "date_next": txn.get("date_next"),
                        "frequency": txn.get("frequency"),
                        "amount": txn["amount"] / 1000 if txn.get("amount") else 0,
                        "memo": txn.get("memo"),
                        "flag_color": txn.get("flag_color"),
                        "account_id": txn.get("account_id"),
                        "account_name": txn.get("account_name"),
                        "payee_id": txn.get("payee_id"),
                        "payee_name": txn.get("payee_name"),
                        "category_id": txn.get("category_id"),
                        "category_name": txn.get("category_name"),
                        "deleted": txn.get("deleted"),
                    }
                )
    
            return scheduled_txns
        except Exception as e:
            raise Exception(f"Failed to get scheduled transactions: {e}") from e
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 it 'Get[s] all scheduled transactions' but doesn't disclose behavioral traits like whether this is a read-only operation, if it requires specific permissions, what happens with large result sets (e.g., pagination), or error conditions. The description is minimal and lacks critical operational context.

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 appropriately sized and front-loaded, with the core purpose stated first, followed by structured sections for Args and Returns. Every sentence earns its place by providing essential information without redundancy or fluff.

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 low complexity (one parameter) and the presence of an output schema (which handles return values), the description is somewhat complete but has gaps. It covers the basic purpose and parameter semantics but lacks usage guidelines and behavioral transparency, which are important for a tool that might interact with financial data and has many siblings.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds meaningful semantics beyond the input schema, which has 0% description coverage. It explains that 'budget_id' is 'The ID of the budget' and provides a usage tip ('use 'last-used' for default budget'), clarifying parameter purpose and a practical default value that isn't in the schema. With only one parameter, this adequately compensates for the schema gap.

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 ('all scheduled transactions'), making the purpose unambiguous. However, it doesn't differentiate from sibling tools like 'get_transactions' or 'get_unapproved_transactions' to explain why this specific tool is needed for scheduled transactions versus other transaction types.

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 'get_transactions' and 'get_unapproved_transactions', it's unclear if this tool is for recurring/future transactions, how it differs in scope, or what prerequisites might exist beyond the budget_id parameter.

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/dgalarza/ynab-mcp-dgalarza'

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