list-scheduled-transactions
View all upcoming scheduled transactions for your budget to forecast and manage bills effectively. Works with YNAB to enhance financial planning and control.
Instructions
List all upcoming scheduled transactions for a given budget. Useful for forecasting upcoming bills.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| budget_id | No | The ID of the budget. If not provided, the default budget will be used. |
Implementation Reference
- src/ynab_mcp_server/server.py:413-431 (handler)Handler logic for executing the 'list-scheduled-transactions' tool. Retrieves scheduled transactions via ynab_client and returns a formatted text list.elif name == "list-scheduled-transactions": budget_id = await _get_budget_id(arguments) transactions = await ynab_client.get_scheduled_transactions(budget_id=budget_id) if not transactions: return [types.TextContent(type="text", text="No scheduled transactions found.")] scheduled_list = "\n".join( f"- {t.var_date}: {t.payee_name or 'N/A'} | " f"{t.category_name or 'N/A'} | {t.amount / 1000:.2f} " f"(Frequency: {t.frequency})" for t in transactions ) return [ types.TextContent( type="text", text=f"Here are the scheduled transactions:\n{scheduled_list}", ) ]
- YNABClient helper method that calls the YNAB API to fetch scheduled transactions for a budget.async def get_scheduled_transactions( self, budget_id: str ) -> list[ynab.ScheduledTransactionDetail]: response = await self._run_sync( self._scheduled_transactions_api.get_scheduled_transactions, budget_id ) return response.data.scheduled_transactions
- src/ynab_mcp_server/server.py:92-104 (registration)Tool registration in list_tools() handler, defining name, description, and input schema.types.Tool( name="list-scheduled-transactions", description="List all upcoming scheduled transactions for a given budget. Useful for forecasting upcoming bills.", inputSchema={ "type": "object", "properties": { "budget_id": { "type": "string", "description": "The ID of the budget. If not provided, the default budget will be used.", } }, }, ),
- src/ynab_mcp_server/server.py:95-102 (schema)Input schema definition for the list-scheduled-transactions tool.inputSchema={ "type": "object", "properties": { "budget_id": { "type": "string", "description": "The ID of the budget. If not provided, the default budget will be used.", } },
- src/ynab_mcp_server/server.py:30-40 (registration)Includes 'list-scheduled-transactions' in the set of read-only tools.READ_ONLY_TOOLS = { "list-budgets", "list-accounts", "list-transactions", "list-categories", "list-payees", "list-scheduled-transactions", "get-financial-overview", "get-month-info", "lookup-payee-locations", }