Skip to main content
Glama
backblaze-labs

Backblaze B2 MCP Server

Official

b2_update_file_retention

DestructiveIdempotent

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.

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. Changed2 schema fields changed
    • removedInput schema / properties / fileRetention / properties / retainUntilTimestamp / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / fileRetention / properties / retainUntilTimestamp / type
      Added value: +[
      +  "number",
      +  "null"
      +]
  2. 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."
  3. First observedv0.2.0

TDQS

A3.7/5.0
Behavior4/5

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

Beyond the annotations (destructiveHint=true, idempotentHint=true, readOnlyHint=false), the description discloses two meaningful traits: the writeFileRetentions capability requirement and the compliance-mode rule that retain-until can only be extended. It does not confirm whether governance clearing needs bypassGovernance, but the schema 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.

Conciseness4/5

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

Three tight sentences lead with the operation, then capabilities, then the compliance constraint. No filler, though the middle mode sentence could be folded more tightly into the first.

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?

For a nested-object mutation with no output schema, the description plus the rich schema covers parameters, capability prerequisites, and the key mode constraint. An agent has enough to invoke it correctly; only the governance/clear interaction is left to schema reading.

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 fileId, fileName, confirm, fileRetention.mode, retainUntilTimestamp, and bypassGovernance. The description adds only the compliance-mode extension constraint, so the baseline 3 is appropriate.

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

Purpose4/5

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

States a specific verb ('Set or modify') and resource ('retention policy on a specific file version in B2'), which is concrete enough to distinguish it from generic file operations. It does not explicitly contrast with the closely-related sibling b2_update_file_legal_hold, so it stops short of full sibling differentiation.

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 implies when each mode applies ('governance and compliance retention modes') and notes a compliance-specific constraint, but gives no explicit when-to-use guidance or comparison against alternatives like b2_update_file_legal_hold. Usage must be inferred from the mode semantics.

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