Skip to main content
Glama
WGDevelopment

YNAB MCP Server

ynab_get_payees

Read-onlyIdempotent

List all payees in your YNAB budget to identify transaction recipients. Specify a budget ID or default to your last-used budget.

Instructions

List all payees in the budget.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The tool yn​ab_get_payees handler function. Decorated with @mcp.tool, it calls the YNAB API to list all payees, filters out deleted and transfer payees, sorts them alphabetically, and returns a formatted markdown string.
    @mcp.tool(
        name="ynab_get_payees",
        annotations={
            "title": "List Payees",
            "readOnlyHint": True,
            "destructiveHint": False,
            "idempotentHint": True,
            "openWorldHint": False,
        }
    )
    async def ynab_get_payees(params: GetPayeesInput) -> str:
        """List all payees in the budget."""
        try:
            async with YNABClient() as client:
                payees = await client.get_payees(params.budget_id)
            
            payees = [p for p in payees if not p.get("deleted") and not p["name"].startswith("Transfer")]
            payees = sorted(payees, key=lambda p: p["name"].lower())
            
            result = f"## Payees ({len(payees)} total)\n\n"
            
            for p in payees[:100]:
                result += f"- {p['name']} (`{p['id']}`)\n"
            
            if len(payees) > 100:
                result += f"\n*...and {len(payees) - 100} more*\n"
            
            return result
        except Exception as e:
            return format_error(e)
  • The @mcp.tool decorator that registers yn​ab_get_payees with the MCP server, including annotations for title, readOnlyHint, destructiveHint, idempotentHint, and openWorldHint.
    @mcp.tool(
        name="ynab_get_payees",
        annotations={
            "title": "List Payees",
            "readOnlyHint": True,
            "destructiveHint": False,
            "idempotentHint": True,
            "openWorldHint": False,
        }
  • The GetPayeesInput schema class, which extends BudgetIdInput (with a single budget_id field). Defines the input parameter for the yn​ab_get_payees tool.
    class GetPayeesInput(BudgetIdInput):
        """Input for listing all payees."""
        pass
  • The API client method get_payees that makes the actual HTTP GET request to the YNAB API endpoint /budgets/{budget_id}/payees and returns the payees list.
    async def get_payees(self, budget_id: str) -> List[Dict[str, Any]]:
        """Get all payees for a budget."""
        response = await self._request("GET", f"/budgets/{budget_id}/payees")
        return response["data"]["payees"]
Behavior3/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, and idempotentHint=true. The description adds no behavioral context beyond listing, which is consistent.

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?

Single sentence, front-loaded, no extraneous words. Efficient and direct.

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

Completeness4/5

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

With an output schema present and a simple input (one parameter, no enums), the description covers the essential purpose. Additional context about return format or filtering is not critical but could be added.

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

Parameters3/5

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

The schema description for the budget_id parameter is adequate, and the tool description adds no additional parameter meaning. Baseline 3 is appropriate given existing schema coverage.

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 'List all payees in the budget' uses a specific verb 'list' and resource 'payees', clearly distinguishing it from sibling tools like ynab_get_accounts or ynab_get_categories.

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 on when to use this tool versus alternatives such as ynab_get_categories or ynab_get_transactions; no examples or use cases are provided.

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

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