Skip to main content
Glama
justmytwospence

ynab-mcp

get_payee_locations_for_payee

Retrieve GPS locations for a specific payee in YNAB to track transaction geography and enhance budget accuracy.

Instructions

[1 API call] Get all GPS locations for a specific payee

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
budget_idNoBudget ID or 'last-used'last-used
payee_idYesThe payee ID

Implementation Reference

  • The tool 'get_payee_locations_for_payee' is registered and implemented in the same block, using 'getClient().payeeLocations.getPayeeLocationsByPayee' to fetch data.
    server.registerTool("get_payee_locations_for_payee", {
      title: "Get Locations for Payee",
      description: "[1 API call] Get all GPS locations for a specific payee",
      inputSchema: {
        budget_id: z.string().default("last-used").describe("Budget ID or 'last-used'"),
        payee_id: z.string().describe("The payee ID"),
      },
      annotations: { readOnlyHint: true },
    }, async ({ budget_id, payee_id }) => {
      try {
        const response = await getClient().payeeLocations.getPayeeLocationsByPayee(budget_id, payee_id);
        const locations = response.data.payee_locations;
        if (locations.length === 0) return textResult("No locations found for this payee.");
        const lines = locations.map((l) =>
          `- (${l.latitude}, ${l.longitude}) [ID: ${l.id}]`
        );
        return textResult(`Locations for payee ${payee_id}:\n${lines.join("\n")}`);
      } catch (e: any) {
        return errorResult(e.message);
      }
    });

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

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