Skip to content

Correct a case

A wrong radicado, juzgado, cliente or party: edit it or, once a notification has gone out, open a correction.

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/correct-a-case"})

docs://recipes/correct-a-case
docs://recipes/correct-a-case — fix a wrong radicado, juzgado or party on a case

Use when a case was registered with a mistake: a digit of the radicado, the juzgado or its email,
the cliente, or a party's name or cédula/NIT. What happens depends on one thing: whether a
notification of the case already left draft. What was sent is evidence and is never edited.

1. whoami({})
   → orgId
   skip if you already hold orgId

2. manage_resource({resource:"cases", action:"getCase", params:{orgId:"<orgId>", caseId:"<case.id>"}})
   → the case, parties[] (party.id, role, name, idNumber), locked
   No case.id? docs://recipes/find-a-case-by-radicado.
   locked false? Step 3. locked true? Step 4.

3. Not locked — edit in place, sending only the fields that change:
   manage_resource({resource:"cases", action:"updateCase", params:{caseId:"<case.id>", juzgado:"<court name>", juzgadoEmail:"<court buzón>"}})
   → the case
   Allowed fields: radicado, juzgado, juzgadoEmail, ciudad, especialidad, claseProceso, cliente.
   A party:
   manage_resource({resource:"parties", action:"updateParty", params:{partyId:"<party.id>", role:"demandado", name:"<name as in the demanda>", idNumber:"<cédula or NIT>"}})
   updateParty REPLACES role, name and idNumber: send all three (leaving idNumber out clears it).
   A party that should not be there:
   manage_resource({resource:"parties", action:"removeParty", params:{partyId:"<party.id>"}})
   X_CASE_LOCKED? A notification left draft meanwhile — go to step 4.
   Done here.

4. Locked — open a corrected case that names the old one. Confirm with the lawyer first: the old
   case is archived in the same call (its notifications and evidence stay as they are).
   manage_resource({resource:"cases", action:"createCase", params:{radicado:"<radicado>", juzgado:"<court name>", juzgadoEmail:"<court buzón>", ciudad:"<city>", especialidad:"<especialidad>", claseProceso:"<clase de proceso>", cliente:"<client>", correctionOf:"<case.id>"}})
   → the new case.id   every field again, corrected; the radicado may be the same one
   Then add its parties to the new case:
   manage_resource({resource:"parties", action:"addParty", params:{caseId:"<new case.id>", role:"demandado", name:"<name as in the demanda>"}})
   New notifications go on the new case. A notification already sent with the wrong data is not
   fixed by this: if it matters, the lawyer notifies again from the new case.

Done when getCase shows the right data (step 3), or the new case exists and names the old one
in correctionOf (step 4).

Tips
- Never use updateCase to register a different proceso: that is createCase without correctionOf.
- Adding a party is allowed even on a locked case (a new demandado for a later notification).
- An archived case refuses edits (X_CASE_ARCHIVED). Reopening one:
  manage_resource({resource:"cases", action:"unarchiveCase", params:{caseId:"<case.id>"}})

All recipes · Connect an assistant