Ir al contenido

get_spending_trends

Return monthly spending trends per category over the last N months.

The result maps each category name to its spending month by month, oldest first, in currency units.

Tipo solo lectura
Confirmación no
Deshacer no
Idempotente sí
Peticiones a YNAB 4 para el ejemplo de abajo, con la caché vacía
Nombre Tipo Obligatorio Por defecto Descripción
plan_id string sí — YNAB plan id or ‘last-used’.
months_count integer no 3 Number of past months to include (default 3).

object

Argumentos:

{
"plan_id": "demo-budget",
"months_count": 3
}

Respuesta sobre el presupuesto de demostración:

{
"Rent": [
{
"month": "2026-07-01",
"amount": 950.0
},
{
"month": "2026-08-01",
"amount": 950.0
},
{
"month": "2026-09-01",
"amount": 950.0
}
],
"Electricity": [
{
"month": "2026-07-01",
"amount": 64.2
},
{
"month": "2026-08-01",
"amount": 64.2
},
{
"month": "2026-09-01",
"amount": 0.0
}
],
"Phone": [
{
"month": "2026-07-01",
"amount": 19.99
},
{
"month": "2026-08-01",
"amount": 19.99
},
{
"month": "2026-09-01",
"amount": 19.99
}
],
"Groceries": [
{
"month": "2026-07-01",
"amount": 172.89
},
{
"month": "2026-08-01",
"amount": 192.51
},
{
"month": "2026-09-01",
"amount": 0.0
}
],
"Restaurants": [
{
"month": "2026-07-01",
"amount": 61.5
},
{
"month": "2026-08-01",
"amount": 89.1
},
{
"month": "2026-09-01",
"amount": 142.5
}
],
"Transport": [
{
"month": "2026-07-01",
"amount": 45.0
},
{
"month": "2026-08-01",
"amount": 45.0
},
{
"month": "2026-09-01",
"amount": 0.0
}
],
"Tennis": [
{
"month": "2026-07-01",
"amount": 22.0
},
{
"month": "2026-08-01",
"amount": 22.0
},
{
"month": "2026-09-01",
"amount": 0.0
}
],
"Subscriptions": [
{
"month": "2026-07-01",
"amount": 13.49
},
{
"month": "2026-08-01",
"amount": 13.49
},
{
"month": "2026-09-01",
"amount": 0.0
}
],
"Holidays": [
{
"month": "2026-07-01",
"amount": 0.0
},
{
"month": "2026-08-01",
"amount": 0.0
},
{
"month": "2026-09-01",
"amount": 0.0
}
]
}

Esta herramienta no lanza errores propios; los errores de YNAB llegan como Error calling tool '<tool>': YNAB <status>: <detail>.

Proyecto no oficial. «We are not affiliated, associated, or in any way officially connected with YNAB or any of its subsidiaries or affiliates.» No estamos afiliados, asociados ni conectados oficialmente con YNAB. YNAB y You Need A Budget son marcas registradas de YNAB. avenir-mcp se ofrece tal cual, sin garantía, y no es asesoramiento financiero. Aviso legal