list-payees
Retrieve all payees for a specified YNAB budget to locate payee IDs or identify duplicate entries requiring consolidation.
Instructions
List all payees for a given budget. Good for finding payee IDs or identifying messy payee data that needs to be merged.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "list-payees"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| budget_id | No | The ID of the budget. If not provided, the default budget will be used. |
Implementation Reference
- src/ynab_mcp_server/server.py:290-304 (handler)Handler logic for the 'list-payees' tool: parses arguments, fetches payees from YNAB client, formats and returns the list as text content.
elif name == "list-payees": args = ListPayeesInput.model_validate(arguments or {}) budget_id = await _get_budget_id(args.model_dump()) payees = await ynab_client.get_payees(budget_id=budget_id) if not payees: return [types.TextContent(type="text", text="No payees found for this budget.")] payee_list = "\n".join(f"- {p.name} (ID: {p.id})" for p in payees) return [ types.TextContent( type="text", text=f"Here are the payees for budget {budget_id}:\n{payee_list}", ) ] - src/ynab_mcp_server/server.py:72-76 (registration)Registration of the 'list-payees' tool in the list_tools handler, including name, description, and input schema reference.
types.Tool( name="list-payees", description="List all payees for a given budget. Good for finding payee IDs or identifying messy payee data that needs to be merged.", inputSchema=ListPayeesInput.model_json_schema(), ), - Pydantic model defining the input schema for 'list-payees' tool, inheriting from BudgetIdInput (optional budget_id).
class ListPayeesInput(BudgetIdInput): pass