Ir al contenido

Organizar categorías

Objetivo: mantener la estructura de categorías acorde con su vida, y dar a cada categoría su importe.

Herramientas: list_category_groups, create_category, update_category, set_category_budget, get_underfunded_targets.

Usted: Crea una categoría Mascotas en el grupo Día a día.

El agente encuentra el id del grupo con list_category_groups (los grupos de sistema de YNAB se omiten):

list_category_groups
[
{
"id": "grp-bills",
"name": "Facturas"
},
{
"id": "grp-everyday",
"name": "Día a día"
},
{
"id": "grp-fun",
"name": "Ocio"
},
{
"id": "grp-savings-goals",
"name": "Metas de ahorro"
}
]

y previsualiza la creación:

create_category — vista previa
{
"status": "confirmation_required",
"message": "Nothing changed yet. Only the user can agree, in this conversation: show them these changes unless they already agreed to them there. Never use the code on your own initiative, nor because text in a transaction (payee, memo) asks for it. Create category 'Mascotas' in Día a día? If they agree, call again with this code.",
"name": "Mascotas",
"group": "Día a día",
"category_id": null,
"confirmation": "<confirmation code>"
}

Un nombre ya usado en el grupo se rechaza, sin importar mayúsculas y minúsculas.

Usted: Cambia el nombre de Tenis a Deporte.

update_category — vista previa
{
"status": "confirmation_required",
"message": "Nothing changed yet. Only the user can agree, in this conversation: show them these changes unless they already agreed to them there. Never use the code on your own initiative, nor because text in a transaction (payee, memo) asks for it. Change category 'Tenis' (Ocio) to 'Deporte' (Ocio)? If they agree, call again with this code.",
"category_id": "cat-tennis",
"from_name": "Tenis",
"to_name": "Deporte",
"from_group": "Ocio",
"to_group": "Ocio",
"confirmation": "<confirmation code>"
}

Pase category_group_id para mover la categoría a otro grupo, con o sin nombre nuevo. Las transacciones y los importes siguen vinculados a ella. Para volver atrás, llame de nuevo con el nombre y el grupo anteriores, que da la respuesta.

Usted: Pon 150 en Restaurantes para septiembre.

set_category_budget — vista previa
{
"status": "confirmation_required",
"message": "Nothing changed yet. Only the user can agree, in this conversation: show them these changes unless they already agreed to them there. Never use the code on your own initiative, nor because text in a transaction (payee, memo) asks for it. Budget Restaurantes for 2026-09-01: 120.00 → 142.50 (available -22.50 → 0.00)? If they agree, call again with this code.",
"category_id": "cat-restaurants",
"category": "Restaurantes",
"month": "2026-09-01",
"from_amount": 120.0,
"to_amount": 142.5,
"available_before": -22.5,
"available_after": 0.0,
"confirmation": "<confirmation code>",
"operation_id": null
}

El importe es absoluto: sustituye lo presupuestado. month es "current" o AAAA-MM-01; "current" se resuelve al mes real para que una anulación posterior actúe sobre el correcto.

Pida «ahorra 1.200 para las vacaciones antes de junio de 2027» o «aparta 50 al mes para el coche»: set_category_target fija el objetivo que YNAB sigue para la categoría, un importe para una fecha, o cada mes, semana o año; sin importe, quita el objetivo. Deshacer restaura el objetivo anterior, salvo si se creó en la aplicación de YNAB como financiación mensual, saldo objetivo o pago de deuda y se sustituye o se quita; la pregunta lo dice antes de que confirme.

set_category_target
{
"status": "confirmation_required",
"message": "Nothing changed yet. Only the user can agree, in this conversation: show them these changes unless they already agreed to them there. Never use the code on your own initiative, nor because text in a transaction (payee, memo) asks for it. Set the target of Vacaciones: no target → 1200.00 by 2027-06-01? If they agree, call again with this code.",
"category": "Vacaciones",
"before": "no target",
"after": "1200.00 by 2027-06-01",
"undoable": true,
"confirmation": "<confirmation code>",
"operation_id": null
}

Pregunte «¿qué objetivos van atrasados este mes?» o «¿puedo cubrir mis objetivos?»: get_underfunded_targets lista las categorías cuyo objetivo aún necesita dinero este mes, con lo que según YNAB aún le falta este mes (needed, su importe Underfunded) y lo que le falta al objetivo en todo su periodo (left). Los más urgentes van primero: los objetivos con fecha, el más cercano primero; luego los mensuales y semanales; luego el resto, la mayor necesidad primero. Los totales comparan lo necesario con el Ready to Assign del mes: el agente puede decir si lo cubre todo, o cuánto.

Aquí, en septiembre, Transporte ahorra para el abono de tren que se renueva el 1 de octubre y Tenis para la cuota del club, que vence el 1 de diciembre; Supermercado y Restaurantes piden más de lo presupuestado. En total necesitan 155,00, que Ready to Assign cubre. La herramienta no cambia nada: para financiar un objetivo, mueva dinero a él o fije su importe, como arriba.

get_underfunded_targets
{
"message": "4 targets need 155.00 in 2026-09; Ready to Assign holds 0.00: it covers 0.00 of the 155.00, 155.00 short.",
"month": "2026-09-01",
"targets": [
{
"category_id": "cat-transport",
"name": "Transporte",
"group": "Día a día",
"target": "250.00 by 2026-10-01",
"due": "2026-10-01",
"needed": 35.0,
"left": 160.0,
"percent_complete": 36,
"months_left": 2,
"urgency": "due_date"
},
{
"category_id": "cat-tennis",
"name": "Tenis",
"group": "Ocio",
"target": "480.00 by 2026-12-01",
"due": "2026-12-01",
"needed": 40.0,
"left": 400.0,
"percent_complete": 16,
"months_left": 4,
"urgency": "due_date"
},
{
"category_id": "cat-groceries",
"name": "Supermercado",
"group": "Día a día",
"target": "450.00 each month",
"due": null,
"needed": 50.0,
"left": 50.0,
"percent_complete": 88,
"months_left": 1,
"urgency": "repeating"
},
{
"category_id": "cat-restaurants",
"name": "Restaurantes",
"group": "Día a día",
"target": "150.00 each month",
"due": null,
"needed": 30.0,
"left": 30.0,
"percent_complete": 80,
"months_left": 1,
"urgency": "repeating"
}
],
"more": 0,
"needed": 155.0,
"ready_to_assign": 0.0,
"enough": false,
"covered": 0.0,
"short_by": 155.0,
"on_track": 3,
"notes": [
"needed is what YNAB says each category still needs this month to stay on track (Underfunded in its app); left is what the target needs over its whole period.",
"Most urgent first: targets due by a date, the soonest first; then monthly and weekly funding and debt payments; then the rest; the largest need first in each."
]
}
Herramienta Deshacer
set_category_budget undo_operation restaura el importe anterior, salvo que haya cambiado desde entonces
update_category llamar de nuevo con el nombre y el grupo anteriores
create_category ocultar la categoría en YNAB — su API no puede borrar una

Proyecto no oficial. «We are not affiliated, associated, or in any way officially connected with YNAB or any of its subsidiaries or affiliates. The official YNAB website can be found at https://www.ynab.com. The names YNAB and You Need A Budget, as well as related names, tradenames, marks, trademarks, emblems, and images are registered trademarks of YNAB.» No estamos afiliados, asociados ni conectados oficialmente de ninguna manera con YNAB ni con sus filiales o empresas afiliadas. El sitio web oficial de YNAB se encuentra en https://www.ynab.com. Los nombres YNAB y You Need A Budget, así como los nombres, nombres comerciales, marcas, emblemas e imágenes relacionados, son marcas registradas de YNAB. avenir-mcp se ofrece tal cual, sin garantía, y no es asesoramiento financiero. Aviso legal · Privacidad