Skip to main content
Glama
klauern

MCP YNAB Server

by klauern

set_preferred_budget_id

Specify which YNAB budget to use for subsequent operations in the MCP YNAB Server by setting a budget ID.

Instructions

Set the preferred YNAB budget ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
budget_idYes

Implementation Reference

  • MCP tool handler for 'set_preferred_budget_id'. Decorated with @mcp.tool() which registers the tool. Delegates to YNABResources helper and returns confirmation.
    @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 YNABResources class that sets the preferred budget ID in memory and persists it to a JSON file (actually plain text file). Called by the tool handler.
    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)
  • The @mcp.tool() decorator registers the function as an MCP tool with the name matching the function name 'set_preferred_budget_id'.
    @mcp.tool()
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool performs a 'Set' action, implying mutation, but doesn't disclose whether this requires specific permissions, if changes are reversible, or what the expected outcome is. This leaves significant gaps in understanding the tool's behavior.

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, direct sentence with no wasted words, making it highly concise and front-loaded. It efficiently communicates the core action without unnecessary elaboration, earning a top score for brevity and clarity.

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 the tool's mutation nature, lack of annotations, no output schema, and low schema coverage, the description is insufficient. It doesn't cover behavioral aspects like side effects, error conditions, or return values, leaving the agent with incomplete context for safe and effective use.

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

Parameters2/5

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

The schema description coverage is 0%, so the description must compensate for the undocumented parameter 'budget_id'. It mentions 'budget ID' but doesn't explain what a budget ID is, how to obtain it, or any constraints (e.g., format, validity). This adds minimal semantic value beyond the schema's basic type information.

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 ('Set') and the target resource ('preferred YNAB budget ID'), making the purpose understandable. However, it doesn't differentiate from sibling tools like 'get_budgets' or explain what 'preferred' means in context, which prevents a perfect score.

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 is provided on when to use this tool versus alternatives like 'get_budgets' or other budget-related tools. The description lacks context about prerequisites, such as whether a budget must exist or be accessible, leaving the agent without usage direction.

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

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