Administrar plantillas de mensaje
Crear y corregir las plantillas de la firma, con campos combinados; los textos del art. 8 se agregan siempre.
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/manage-message-templates"})
docs://recipes/manage-message-templates — the firm's own wording for notification emails
Use when the lawyer wants a standard message for a kind of proceso (a Laboral wording, a
cobranza wording) instead of the built-in text, or wants to change one. The art. 8 statements
(when the notification is deemed done, when terms start) are ALWAYS appended by the system:
never write them into a template, and never try to remove them.
1. whoami({})
→ orgId, role
role not "owner" or "lawyer"? You can list templates, not write them.
skip if you already hold orgId
2. manage_resource({resource:"templates", action:"listMessageTemplates", params:{orgId:"<orgId>"}})
→ templates[]: id, name, especialidad, subject, body
The first read seeds three defaults. Add archived:true to params to include archived ones.
A template close to what the lawyer wants? Offer to change it (step 4) rather than add one.
3. To add one:
manage_resource({resource:"templates", action:"createMessageTemplate", params:{orgId:"<orgId>", name:"<template name>", especialidad:"<especialidad>", subject:"<subject>", body:"<body>"}})
→ template.id
Merge fields, the ONLY ones allowed in subject and body: {radicado}, {juzgado},
{juzgado_email}, {clase_proceso}, {demandante}, {demandado}, {destinatario}, {providencia},
{fecha_auto}. Any other {…} is refused. especialidad null = for every especialidad.
Show the lawyer the full text before this call.
4. To change one:
manage_resource({resource:"templates", action:"updateMessageTemplate", params:{orgId:"<orgId>", templateId:"<template.id>", name:"<template name>", subject:"<subject>", body:"<body>"}})
→ the template
Send name, subject and body every time, all three (and especialidad to keep it); it replaces
the template, it does not patch it.
5. To use it, pass messageTemplateId:"<template.id>" in createNotification's params
(docs://recipes/send-an-article-8-notification step 5). A draft already written keeps its
text until updateDraft recomposes it.
Done when the template reads as the lawyer approved and they know how to pick it on a new draft.
Tips
- Write in Spanish, usted, the way the firm writes to a demandado; plain text, no HTML.
- Never put a deadline, a date or an address in a template: those come from the case and the
notification.