list_payee_locations
Retrieve GPS locations for all payees in a YNAB budget to map transaction origins and analyze spending patterns.
Instructions
[1 API call] List all payee GPS locations for a budget
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| budget_id | No | Budget ID or 'last-used' | last-used |
Implementation Reference
- src/tools/payee-locations.ts:7-26 (handler)The registration and handler implementation for the list_payee_locations tool.
server.registerTool("list_payee_locations", { title: "List Payee Locations", description: "[1 API call] List all payee GPS locations for a budget", inputSchema: { budget_id: z.string().default("last-used").describe("Budget ID or 'last-used'"), }, annotations: { readOnlyHint: true }, }, async ({ budget_id }) => { try { const response = await getClient().payeeLocations.getPayeeLocations(budget_id); const locations = response.data.payee_locations; if (locations.length === 0) return textResult("No payee locations found."); const lines = locations.map((l) => `- Payee ${l.payee_id}: (${l.latitude}, ${l.longitude}) [ID: ${l.id}]` ); return textResult(`Payee Locations (${locations.length}):\n${lines.join("\n")}`); } catch (e: any) { return errorResult(e.message); } });