b2_update_file_retention
Set or modify a file version's retention policy in B2, supporting governance and compliance modes with extension-only updates for compliance.
Instructions
Set or modify the retention policy on a specific file version in B2. Supports governance and compliance retention modes. In compliance mode, the retain-until date can only be extended. Requires the writeFileRetentions capability.
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": {
"fileId": "<fileId>",
"fileName": "<fileName>",
"fileRetention": "<fileRetention>"
},
"name": "b2_update_file_retention"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fileId | Yes | The B2 file ID of the file to update. | |
| confirm | No | Fallback confirmation for this irreversible/protection-removing operation when the effective server destructive policy is 'confirm' and MCP elicitation cannot run. | |
| fileName | Yes | The name of the file (required by the B2 API alongside fileId). | |
| fileRetention | Yes | Retention policy to apply, or { mode: null, retainUntilTimestamp: null } to clear. This is the flat shape B2's write API expects — do NOT include the read-only isClientAuthorizedToRead/value wrapper that b2_get_file_info returns. | |
| bypassGovernance | No | If true, allows overriding governance-mode retention. Requires bypassGovernance capability. |