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.

Usted: Crea una categoría Pets en Everyday.

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": "Bills"
},
{
"id": "grp-everyday",
"name": "Everyday"
},
{
"id": "grp-fun",
"name": "Fun"
},
{
"id": "grp-savings-goals",
"name": "Savings goals"
}
]

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 'Pets' in Everyday? If they agree, call again with this code.",
"name": "Pets",
"group": "Everyday",
"category_id": null,
"confirmation": "<confirmation code>"
}

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

Usted: Renombra Tennis a Sport.

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 'Tennis' (Fun) to 'Sport' (Fun)? If they agree, call again with this code.",
"category_id": "cat-tennis",
"from_name": "Tennis",
"to_name": "Sport",
"from_group": "Fun",
"to_group": "Fun",
"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 Restaurants 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 Restaurants for 2026-09-01: 120.00 → 150.00? If they agree, call again with this code.",
"category_id": "cat-restaurants",
"category": "Restaurants",
"month": "2026-09-01",
"from_amount": 120.0,
"to_amount": 150.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 un deshacer posterior actúe sobre el correcto.

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.» 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