Recipe for agents
Download evidence for an expert witness
Get the signed constancia and the evidence package for the case file or a perito.
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/download-evidence-for-a-perito"})
docs://recipes/download-evidence-for-a-perito — fetch the signed constancia and the evidence zip
Use when the lawyer needs the proof of a notification for a court filing, the other party or an
expert witness (perito). The zip is what a perito verifies independently, without Notificado.
Every download is recorded (audit log + an evidence event) — do not download "just to look".
1. whoami({})
→ orgId, scopes
scopes lack "evidence:read"? Stop: the token cannot download evidence.
skip if you already hold orgId
2. notificationDetail({orgId:"<orgId>", id:"<notification.id>"})
→ status, timeline[]
status is not "sent"? No constancia exists yet — stop and say when to try again.
No notification.id? Get it with docs://recipes/check-a-notification-status step 2.
3. downloadEvidence({orgId:"<orgId>", notificationId:"<notification.id>", kind:"constancia"})
→ filename, contentType "application/pdf", sha256, contentBase64, version
X_CONSTANCIA_NOT_FOUND? It is issued once delivery events arrive — try again later, stop now.
Newest version by default; pass version:<n> only when the lawyer asks for an older one.
4. downloadEvidence({orgId:"<orgId>", notificationId:"<notification.id>", kind:"zip"})
→ filename, sha256, contentBase64
X_EVIDENCE_ZIP_NOT_READY? It is still being built — retry once after 30 seconds, then stop.
5. Decode contentBase64 to a file with the given filename. Check that SHA-256 of the decoded bytes
equals sha256 — if not, discard it and report; never hand over bytes that do not match.
Done when the lawyer has both files and both hashes.
Tips
- The zip contains the original .eml, the attachments, raw provider events, RFC 3161 timestamp
tokens (.tsr), the constancia and offline verification instructions (verificar.js). A perito
needs nothing else and no account.
- Give the lawyer the sha256 values in writing; they are what a court filing cites.
- Anyone can check the PDF later with docs://recipes/verify-a-constancia.
- A re-issued constancia supersedes the older version; both stay valid records.