Skip to main content
Glama

set_preferred_budget_id

Define your primary YNAB budget ID to streamline account balance checks, transaction data access, and new transaction creation within the MCP YNAB Server.

Instructions

Set the preferred YNAB budget ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
budget_idYes

Implementation Reference

  • The MCP tool handler function for 'set_preferred_budget_id', decorated with @mcp.tool(), which delegates to the YNABResources helper method and returns a confirmation message.
    @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}"
  • Helper method in the YNABResources class that sets the preferred budget ID in memory and persists it to a configuration file (PREFERRED_BUDGET_ID_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/Meh-S-Eze/ynab-mcp-client2'

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