b2_update_file_legal_hold
Set or remove a legal hold on a B2 file version to prevent deletion, requiring the writeFileLegalHolds capability. Specify the file ID, name, and hold state to apply or release the hold.
Instructions
Set or clear a legal hold on a specific file version in B2. When a legal hold is active, the file cannot be deleted regardless of retention settings. Requires the writeFileLegalHolds capability on the application key.
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>",
"legalHold": "<legalHold>"
},
"name": "b2_update_file_legal_hold"
}
}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). | |
| legalHold | Yes | 'on' to apply a legal hold; 'off' to remove it. B2's write API expects this bare string — not the isClientAuthorizedToRead/value object that b2_get_file_info returns. |