Put the real names back into a file written from a pseudonymized document
restore_namesReplaces pseudonym tags in your edited file with original names from the correspondence table, writing a restored copy locally. Use it to finish a pseudonymize, edit, re-identify workflow.
Instructions
Put the real names back into a file you wrote from a pseudonymized document: every tag ([Person 1], or the user's rename such as [Seller]) becomes the original text from the correspondence table. Runs entirely on this machine; nothing is uploaded.
Use it at the end of the anonymize -> work -> re-identify loop: redact_pdf_and_wait with mode "pseudonymize" gave you document_text and correspondence_path; you did the work on the tagged text and wrote the result to a .md, .txt or .docx file, keeping each tag exactly as written, brackets included. Pass that file and correspondence_path here.
It writes "-restored." next to your file (never over an existing file) and returns only that path and counts, never a name. Do NOT open, read or quote the restored file or the correspondence CSV: both contain the real names, and reading them puts the personal data into this conversation, which is what pseudonymizing was for. Give the user the path instead.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"file_path": "<file_path>",
"correspondence_path": "<correspondence_path>"
},
"name": "restore_names"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | Absolute path of the file YOU wrote from the pseudonymized text (.md, .markdown, .txt or .docx), with the tags kept as written, e.g. "[Person 1] signed on behalf of [Org 1]". Not the original document. | |
| output_path | No | Where to write the restored copy. Defaults to "<name>-restored.<ext>" next to file_path. Never overwrites an existing file. | |
| correspondence_path | Yes | Absolute path of the correspondence CSV, as returned in correspondence_path by redact_pdf_and_wait or download_correspondence. Pass the path only: do not open the file, it contains the real names. |