# protect_new_version **Protect a new version of an existing document (by bytes)** Protect an UPDATED version of a document already on immut — proves when the file changed. This server is remote and cannot read your filesystem, so pass the new bytes as base64 along with the existing documentId. Use when a protected file has been revised (e.g. a contract re-signed, a policy updated). Do NOT transcribe a large file into base64 here (it is slow and error-prone): for anything substantial use multipart POST /api/v1/documents/{id}/version directly, or install the immut skill so it can read the file locally. Find the documentId with list_documents. - Access: write ## Arguments | Name | Type | Required | Description | |---|---|---|---| | `documentId` | string | **yes** | Id of the existing immut document to add a version to | | `filename` | string | **yes** | Original file name incl. extension | | `contentBase64` | string | **yes** | Base64-encoded bytes of the NEW version | | `runId` | string | no | Id of the sweep this upload belongs to. Use the SAME value on every file in one sweep and on the matching report_run call — it is what links a run to the files it protected. | | `agentClassification` | string | no | What you judged about this file, recorded against the proof. Every field optional — send only what you actually determined, and never invent a verdict you did not reach. | ## Tool contract ```json { "name": "protect_new_version", "title": "Protect a new version of an existing document (by bytes)", "description": "Protect an UPDATED version of a document already on immut — proves when the file changed. This server is remote and cannot read your filesystem, so pass the new bytes as base64 along with the existing documentId. Use when a protected file has been revised (e.g. a contract re-signed, a policy updated). Do NOT transcribe a large file into base64 here (it is slow and error-prone): for anything substantial use multipart POST /api/v1/documents/{id}/version directly, or install the immut skill so it can read the file locally. Find the documentId with list_documents.", "access": "write", "destructive": false, "hostedOnProduction": true, "restEndpoint": null, "arguments": { "documentId": { "type": "string", "required": true, "description": "Id of the existing immut document to add a version to" }, "filename": { "type": "string", "required": true, "description": "Original file name incl. extension" }, "contentBase64": { "type": "string", "required": true, "description": "Base64-encoded bytes of the NEW version" }, "runId": { "type": "string", "required": false, "description": "Id of the sweep this upload belongs to. Use the SAME value on every file in one sweep and on the matching report_run call — it is what links a run to the files it protected." }, "agentClassification": { "type": "string", "required": false, "description": "What you judged about this file, recorded against the proof. Every field optional — send only what you actually determined, and never invent a verdict you did not reach." } } } ```