Receta para agentes
Recargar créditos
Qué hacer cuando la firma se queda sin créditos.
Esta es la receta que el servidor MCP entrega a los asistentes de IA, tal cual. Está en inglés porque los modelos la siguen mejor así; el asistente le responde en su idioma.
Un asistente la lee con docs({uri:"docs://recipes/top-up-credits"})
docs://recipes/top-up-credits — the firm is out of credits
Use when a send would need more credits than the balance, or the lawyer asks how to buy more.
There is NO tool that buys or grants credits, and there never will be one for an agent: money
moves only when a person pays in the panel.
1. whoami({})
→ orgId
skip if you already hold orgId
2. creditsBalance({orgId:"<orgId>"})
→ balance, nextExpiryAt, nextExpiryCredits
One credit = one recipient of one notification, consumed when the lawyer confirms a send.
3. Tell the lawyer, in this order:
- how many credits they have and how many the pending send needs;
- when the soonest batch expires (nextExpiryAt, in America/Bogota), if any;
- that an owner or billing member buys credits at https://www.notificado.co/creditos.
4. Stop. Do not call sendNotification until they say the purchase went through; then call
creditsBalance again to check before you continue.
Done when the lawyer knows the balance, what is missing and where to buy.
Tips
- A send request (awaiting_confirmation) does not reserve credits; they are taken when the lawyer
confirms. A confirmation can still fail with X_CREDITS_INSUFFICIENT if the balance dropped.
- Never suggest splitting recipients across notifications to "save" credits — the cost is per
recipient either way.