Draft a memorial
The draft memorial telling the juzgado the art. 8 notification was made; you review, sign and file it.
This is the recipe the MCP server gives AI assistants, as is. It is in English because models follow it best that way; the assistant answers you in your language.
An assistant reads it with docs({uri:"docs://recipes/draft-a-memorial"})
docs://recipes/draft-a-memorial — generate the memorial telling the juzgado the notification was made
Use when the notification was delivered and the lawyer wants the memorial (escrito) that informs
the juzgado that the art. 8 Ley 2213 notification was practised. You generate a DRAFT (DOCX + PDF);
nothing is filed. The lawyer reviews, signs and files it. For the constancia and the evidence zip
themselves, use docs://recipes/download-evidence-for-a-perito.
1. whoami({})
→ orgId, scopes
scopes lack "notifications:write" or "evidence:read"? Stop: you can check readiness only.
skip if you already hold orgId
2. manage_resource({resource:"memorials", action:"memorialReadiness", params:{orgId:"<orgId>", notificationId:"<notification.id>"}})
→ ready, reason, code
ready true? Continue.
reason "bounce"? A recipient was NOT notified: docs://recipes/handle-a-bounce. Stop.
reason "not-delivered"? No recipient server accepted the message yet. Stop and say so.
reason "constancia-pending" | "term-pending"? Still being produced: check again after one
minute, at most 3 times, then stop.
3. manage_resource({resource:"memorials", action:"createMemorial", params:{orgId:"<orgId>", notificationId:"<notification.id>"}})
→ memorialId, and a job handle
Refused X_MEMORIAL_*? The readiness changed since step 2 — read the fix line, stop.
Call it once per request of the lawyer: each call renders a new memorial.
4. manage_resource({resource:"memorials", action:"notificationMemorials", params:{orgId:"<orgId>", notificationId:"<notification.id>"}})
→ memorials[]: id, createdAt, SHA-256 and size of the DOCX and the PDF
memorialId from step 3 not listed yet? Check again after 5 seconds, at most 6 times.
5. manage_resource({resource:"memorials", action:"downloadMemorial", params:{orgId:"<orgId>", memorialId:"<memorial.id>", format:"docx"}})
→ filename, contentType, sha256, contentBase64
format is "docx" (to edit and sign) or "pdf" (with the constancia's verification QR). Fetch
the pdf the same way if the lawyer wants it. Each download is recorded.
Decode contentBase64; its SHA-256 must equal sha256, or discard it and report.
Done when the lawyer has the draft and you told them it opens with a draft notice: they check it,
sign it and file it themselves.
Tips
- Every memorial of a case:
manage_resource({resource:"memorials", action:"caseMemorials", params:{orgId:"<orgId>", caseId:"<case.id>"}})
- The memorial cites the delivery ("accepted" by the recipient's server) and the acuse if there
is one. An opening is an indicio only and is never cited as notification.
- Term dates in it are an estimate the judge decides; see docs://recipes/track-deadlines.