Skip to main content
Glama
backblaze-labs

Backblaze B2 MCP Server

Official

b2_update_file_retention

DestructiveIdempotent

Update the retention policy on a B2 file by setting governance or compliance modes with a retain-until timestamp, or clear the policy in governance mode. Requires writeFileRetentions capability.

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.

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).
fileRetentionYesRetention 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.
bypassGovernanceNoIf true, allows overriding governance-mode retention. Requires bypassGovernance capability.

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?

Annotations already flag destructiveHint=true, readOnlyHint=false, and idempotentHint=true. The description adds meaningful behavioral context beyond annotations: the capability requirement, the compliance-mode extension-only rule, and the condition that clearing only works in governance mode with bypassGovernance. This gives the agent a clearer safety/behavior model without contradicting 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?

The description is three purposeful sentences: the primary action, the supported modes, and the critical constraint plus capability requirement. It is front-loaded and contains no filler or redundant restatement of the tool name.

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?

Given the nested fileRetention object, the confirm flag, and no output schema, the description plus schema covers what an agent needs to invoke this correctly: required parameters, mode semantics, capability requirements, and destructive implications. A return-shape note would be nice but is not essential for a mutating update tool.

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 schema already documents all five parameters, including the nested fileRetention object. The tool description itself adds little parameter-level detail beyond naming the modes and capability. Baseline 3 is appropriate because the schema carries the parameter semantic burden.

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 and resource: 'Set or modify the retention policy on a specific file version in B2.' It names the two retention modes and clearly differentiates this from the sibling b2_update_file_legal_hold, whose subject is legal hold rather than 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 provides clear operational constraints: governance vs compliance modes, compliance retention can only be extended, clearing requires governance mode, and the writeFileRetentions capability is required. It does not explicitly name alternatives or say 'use X instead,' but the context is sufficient for an agent to decide when this tool applies.

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