Skip to main content
Glama
backblaze-labs

Backblaze B2 MCP Server

Official

b2_create_key

Destructive

Create a scoped B2 application key with least-privilege capabilities, routing the one-time secret through the configured secret sink for secure credential management.

Instructions

Create a B2 application key and route its one-time secret through the configured secret sink. Use for least-privilege scoped credentials; use b2_list_keys to inspect existing keys and b2_delete_key to revoke retired keys. Requires writeKeys, idempotencyKey, and destructive confirmation by policy. File sink mode returns redacted metadata plus a secretSink pointer; inline mode returns the secret only when explicitly enabled. Policy refuses key-management grants and unscoped write/delete grants unless explicit environment overrides are enabled; when B2_MAX_KEY_DURATION_SECONDS is set, it also refuses non-expiring keys or durations above that limit.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
confirmNoFallback confirmation for this durable credential creation when the effective server destructive policy is 'confirm' and MCP elicitation cannot run.
keyNameYesHuman-readable key name for audits and b2_list_keys output.
bucketIdNoDeprecated single-bucket restriction. Use bucketIds for new integrations; do not provide both.
bucketIdsNoOptional bucket ID restrictions. Required by default for keys with write*/delete* capabilities; omit only for intentional account-wide access, and do not combine with bucketId.
namePrefixNoOptional file-name prefix restriction for file capabilities; omit for no prefix restriction.
capabilitiesYesB2 capabilities to grant. They must be allowed by the creating key; listKeys/writeKeys/deleteKeys are refused unless B2_ALLOW_KEY_MGMT_GRANTS=true.
idempotencyKeyYesCaller-generated idempotency key. Reuse the same value only for an identical retry by the same caller; conflicting reuse is rejected.
validDurationInSecondsNoOptional positive key lifetime in seconds. Omit for no expiration only when B2_MAX_KEY_DURATION_SECONDS is not configured.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed7 schema fields changed
    • changedInput schema / properties / bucketIds / description
      Previous value: -"Optional bucket restrictions. Omit for account-wide access."New value: +"Optional bucket ID restrictions. Required by default for keys with write*/delete* capabilities; omit only for intentional account-wide access, and do not combine with bucketId."
    • changedInput schema / properties / capabilities / description
      Previous value: -"B2 capabilities to grant to the new key."New value: +"B2 capabilities to grant. They must be allowed by the creating key; listKeys/writeKeys/deleteKeys are refused unless B2_ALLOW_KEY_MGMT_GRANTS=true."
    • changedInput schema / properties / confirm / description
      Previous value: -"Confirm this durable credential creation. Required when the server destructive policy is 'confirm' (the default)."New value: +"Fallback confirmation for this durable credential creation when the effective server destructive policy is 'confirm' and MCP elicitation cannot run."
    • changedInput schema / properties / idempotencyKey / description
      Previous value: -"Caller-generated idempotency key. Reuse the same value only when retrying the identical durable-key creation request."New value: +"Caller-generated idempotency key. Reuse the same value only for an identical retry by the same caller; conflicting reuse is rejected."
    • changedInput schema / properties / keyName / description
      Previous value: -"Human-readable name for the new key."New value: +"Human-readable key name for audits and b2_list_keys output."
    • changedInput schema / properties / namePrefix / description
      Previous value: -"Optional file-name prefix restriction for file capabilities."New value: +"Optional file-name prefix restriction for file capabilities; omit for no prefix restriction."
    • changedInput schema / properties / validDurationInSeconds / description
      Previous value: -"Optional key lifetime in seconds. Omit for no expiration."New value: +"Optional positive key lifetime in seconds. Omit for no expiration only when B2_MAX_KEY_DURATION_SECONDS is not configured."
  2. First observedv0.2.0

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already mark the tool as destructive and non-idempotent, but the description adds substantial context: the one-time secret handling, file-sink versus inline output modes, idempotency requirements, destructive confirmation by policy, and environment-override restrictions. This goes well beyond the structured 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 dense but every sentence earns its place: purpose, usage routing, output behavior, and policy constraints. The main action is front-loaded, and there is no redundant restatement of the tool name or schema fields.

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

Completeness5/5

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

For an 8-parameter, side-effectful creation tool with no output schema, the description covers the critical non-obvious behavior: secret sink routing, redacted metadata versus inline secret, and policy-driven refusals. Combined with the fully documented input schema, an agent has enough to call the tool correctly in most scenarios.

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

Parameters4/5

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

Schema coverage is 100% with detailed per-parameter descriptions, so the baseline is 3. The description adds value by highlighting idempotencyKey as a requirement, the policy refusal of key-management/unscoped grants, and the B2_MAX_KEY_DURATION_SECONDS constraint that affects validDurationInSeconds and omission semantics.

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 states a precise verb and resource: 'Create a B2 application key' and adds the specific behavior of routing the one-time secret through a secret sink. It is clearly distinguishable from sibling tools like b2_list_keys and b2_delete_key by naming them as complementary operations.

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

Usage Guidelines5/5

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

The description explicitly says to use this tool for least-privilege scoped credentials and names the sibling tools for inspecting and revoking keys. It also gives policy-based constraints on when grants are refused, giving an agent clear routing and precondition guidance.

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

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