Skip to main content
Glama
backblaze-labs

Backblaze B2 MCP Server

Official

b2_update_file_legal_hold

DestructiveIdempotent

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileIdYesThe B2 file ID of the file to update.
confirmNoFallback confirmation for this irreversible/protection-removing operation when the effective server destructive policy is 'confirm' and MCP elicitation cannot run.
fileNameYesThe name of the file (required by the B2 API alongside fileId).
legalHoldYes'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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / confirm / description
      Previous value: -"Confirm this irreversible/protection-removing operation. Required when the server destructive policy is 'confirm' (the default)."New value: +"Fallback confirmation for this irreversible/protection-removing operation when the effective server destructive policy is 'confirm' and MCP elicitation cannot run."
  2. First observedv0.2.0

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond the annotations, which already flag this as destructive, the description adds meaningful behavior: active legal hold overrides retention-based deletion protections, and the operation requires a specific application-key capability. It accurately describes setting and clearing without contradicting the destructiveHint or idempotentHint annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, each earning its place: the first states the action, the second the behavioral consequence, and the third the authorization prerequisite. There is no redundancy or filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description plus the rich schema covers the operation, its effect, the required capability, and the confirm fallback for destructive policy. It does not explain return values, but there is no output schema, and the main remaining gap is that it does not explicitly name b2_update_file_retention as the alternative when retention, rather than legal hold, is the goal.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3 even though the main description does not add parameter-level details. The description's 'regardless of retention settings' provides functional context for the legalHold parameter, but it does not need to explain syntax because the schema already documents the enum and the bare-string requirement.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb and resource: 'Set or clear a legal hold on a specific file version in B2.' It also explains the practical effect—'the file cannot be deleted regardless of retention settings'—which distinguishes it from retention-focused sibling tools like b2_update_file_retention.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives clear context for when this tool is relevant: managing legal holds that prevent deletion, and it names the required capability 'writeFileLegalHolds.' It does not explicitly name alternatives or exclusions, but the contrast with 'retention settings' implies when the retention tool would be the different choice.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.