Skip to main content
Glama
backblaze-labs

Backblaze B2 MCP Server

Official

b2_update_file_legal_hold

DestructiveIdempotent

Set or clear a legal hold on a specific file version in B2 to block deletion. Legal hold overrides retention settings, ensuring protected files cannot be removed.

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.
confirmNoConfirm this irreversible/protection-removing operation. Required when the server destructive policy is 'confirm' (the default).
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.
Install Server

TDQS

A4/5.0
Behavior4/5

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

Annotations already signal destructiveHint=true, readOnlyHint=false, and idempotentHint=true. The description adds useful context beyond those hints: an active legal hold makes the file undeletable regardless of retention settings, and the operation requires a specific capability. It does not separately warn that clearing the hold removes protection, but the destructive annotation already covers that.

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?

Two focused sentences: the first states the action and resource, and the second adds behavioral and permission context. There is no filler, repetition, or unnecessary preamble.

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?

Combined with the full schema and annotations, the description supplies the remaining operational facts: capability requirement and the relationship between legal hold and retention settings. Since there is no output schema, return values are not described, but for a state-setting operation this does not prevent correct invocation.

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 every parameter, including the legalHold enum and the confirm field, is already documented in the input schema. The description adds no parameter-level detail, but none is required beyond the schema's coverage.

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 opens with a specific verb phrase ('Set or clear a legal hold') and identifies the exact resource ('a specific file version in B2'). It further distinguishes this from the related sibling b2_update_file_retention by stating that an active legal hold prevents deletion 'regardless of retention settings.'

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

Usage Guidelines3/5

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

The description states the capability prerequisite (writeFileLegalHolds) and the behavioral effect of an active hold, which lets an agent infer when this tool applies. However, it never explicitly contrasts legal holds with retention policy or names the sibling b2_update_file_retention, so when-to-use guidance is implied rather than directly stated.

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

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/backblaze-labs/b2-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server