Aller au contenu

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.

Nature lecture seule
Confirmation non
Annulation non
Idempotent oui
Requêtes YNAB 4 pour l’exemple ci-dessous, cache vide
Nom Type Obligatoire Défaut Description
plan_id string oui — YNAB plan id or ‘last-used’.
months_count integer non 3 Number of past months to include (default 3).

object

Arguments :

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

Réponse sur le budget de démonstration :

{
"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
}
]
}

Cet outil ne lève pas d’erreur propre ; les erreurs de YNAB reviennent sous la forme Error calling tool '<tool>': YNAB <status>: <detail>.

Projet non officiel. « We are not affiliated, associated, or in any way officially connected with YNAB or any of its subsidiaries or affiliates. » Nous ne sommes ni affiliés, ni associés, ni liés officiellement à YNAB. YNAB et You Need A Budget sont des marques déposées de YNAB. avenir-mcp est fourni tel quel, sans garantie, et n’est pas un conseil financier. Mentions légales