Skip to main content
Glama
dgalarza

YNAB MCP Server

by dgalarza

health_check

Verify MCP server status and YNAB API connectivity to ensure budget management tools are operational and accessible.

Instructions

Check server health and YNAB API connectivity.

This tool performs a lightweight API call to verify that:
- The MCP server is running
- The YNAB access token is valid
- The YNAB API is reachable

Returns:
    JSON string with health status and connection info

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The main handler function for the 'health_check' tool. Decorated with @mcp.tool() which registers it as an MCP tool. It checks YNAB API connectivity by fetching budgets and returns a JSON status.
    @mcp.tool()
    async def health_check() -> str:
        """Check server health and YNAB API connectivity.
    
        This tool performs a lightweight API call to verify that:
        - The MCP server is running
        - The YNAB access token is valid
        - The YNAB API is reachable
    
        Returns:
            JSON string with health status and connection info
        """
        try:
            logger.info("Running health check")
            client = get_ynab_client()
    
            # Make a lightweight API call to verify connectivity
            budgets = await client.get_budgets()
    
            return json.dumps(
                {
                    "status": "healthy",
                    "api_connected": True,
                    "budgets_count": len(budgets),
                    "message": "YNAB MCP server is running and API is accessible",
                },
                indent=2,
            )
        except Exception as e:
            logger.error(f"Health check failed: {e}", exc_info=True)
            return json.dumps(
                {
                    "status": "unhealthy",
                    "api_connected": False,
                    "error": str(e),
                    "message": "YNAB MCP server is running but API is not accessible",
                },
                indent=2,
            )
Behavior4/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 effectively describes the tool's behavior as a 'lightweight API call' that verifies three specific conditions and returns JSON with health status. It doesn't mention rate limits, authentication requirements beyond token validity, or error handling, but covers the core behavioral traits well.

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 perfectly structured and concise - a clear purpose statement followed by bullet points of what it verifies, then a brief note about return format. Every sentence earns its place with no wasted words, and the most important information is front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (0 parameters, has output schema), the description is complete. It explains what the tool does, what it checks, and what it returns. With an output schema present, the description doesn't need to detail return values, and it provides sufficient context for this diagnostic utility among data-focused sibling tools.

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 tool has zero parameters with 100% schema description coverage, so the baseline is 4. The description appropriately doesn't discuss parameters since none exist, which is correct and efficient.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with specific verbs ('check', 'verify') and resources ('server health', 'YNAB API connectivity'). It distinguishes itself from all sibling tools which are focused on YNAB data operations, while this is a diagnostic/health monitoring tool.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context about when to use this tool - to verify server and API connectivity. However, it doesn't explicitly state when NOT to use it or name specific alternatives for similar diagnostic purposes, which prevents a perfect score.

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