Skip to main content
Glama
klauern

MCP YNAB Server

by klauern

set_preferred_budget_id

Set your preferred YNAB budget ID on the MCP YNAB Server to streamline access and manage financial data efficiently.

Instructions

Set the preferred YNAB budget ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
budget_idYes

Implementation Reference

  • The MCP tool handler function, decorated with @mcp.tool(), that sets the preferred budget ID using the YNABResources instance and returns a confirmation string.
    @mcp.tool() async def set_preferred_budget_id(budget_id: str) -> str: """Set the preferred YNAB budget ID.""" ynab_resources.set_preferred_budget_id(budget_id) return f"Preferred budget ID set to {budget_id}"
  • Supporting method in YNABResources class that stores the preferred budget ID in memory and persists it to a JSON file.
    def set_preferred_budget_id(self, budget_id: str) -> None: """Set the preferred budget ID.""" self._preferred_budget_id = budget_id with open(PREFERRED_BUDGET_ID_FILE, "w") as f: f.write(budget_id)

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

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