Skip to main content
Glama
backblaze-labs

Backblaze B2 MCP Server

Official

b2_set_bucket_notification_rules

DestructiveIdempotent

Replace the complete B2 event-notification webhook rule set for a bucket. Submit the full desired rule set after retrieving existing rules, as this operation overwrites all current rules.

Instructions

Replace the complete B2 event-notification webhook rule set for a bucket. Use b2_get_bucket_notification_rules first and submit the full desired rule set; this is not a patch or append API. Requires writeBucketNotifications and destructive confirmation by policy. Each webhook URL must be a public HTTPS endpoint, and echoed URL details, HMAC secrets, and custom-header values are redacted from the response.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
confirmNoFallback confirmation for replacing persistent outbound webhook notification rules when the effective server destructive policy is 'confirm' and MCP elicitation cannot run.
bucketIdYesExact bucket ID whose notification rules should be replaced.
eventNotificationRulesYesComplete replacement rule set for the bucket. Include every rule that should remain; omitted existing rules are removed.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed13 schema fields changed
    • changedInput schema / properties / bucketId / description
      Previous value: -"The bucket ID to set notification rules for."New value: +"Exact bucket ID whose notification rules should be replaced."
    • changedInput schema / properties / confirm / description
      Previous value: -"Confirm replacing persistent outbound webhook notification rules. Required when the server destructive policy is 'confirm' (the default)."New value: +"Fallback confirmation for replacing persistent outbound webhook notification rules when the effective server destructive policy is 'confirm' and MCP elicitation cannot run."
    • addedInput schema / properties / eventNotificationRules / description
      Added value: +"Complete replacement rule set for the bucket. Include every rule that should remain; omitted existing rules are removed."
    • changedInput schema / properties / eventNotificationRules / items / properties / eventTypes / description
      Previous value: -"Event types to trigger notification, e.g. b2:ObjectCreated:*, b2:ObjectDeleted:*."New value: +"B2 event types that trigger delivery, for example b2:ObjectCreated:* or b2:ObjectDeleted:*."
    • changedInput schema / properties / eventNotificationRules / items / properties / isEnabled / description
      Previous value: -"Whether this rule is active."New value: +"Whether B2 should deliver events for this rule."
    • changedInput schema / properties / eventNotificationRules / items / properties / name / description
      Previous value: -"A name for this notification rule."New value: +"Name for this notification rule; must be unique per bucket."
    • changedInput schema / properties / eventNotificationRules / items / properties / objectNamePrefix / description
      Previous value: -"Only objects whose names start with this prefix trigger the rule. Empty string ('') matches all objects. Required by B2 on every rule."New value: +"Object-key prefix that triggers the rule. Defaults to empty string, which matches every object in the bucket."
    • addedInput schema / properties / eventNotificationRules / items / properties / targetConfiguration / properties / customHeaders / description
      Added value: +"Optional custom headers sent with webhook deliveries."
    • addedInput schema / properties / eventNotificationRules / items / properties / targetConfiguration / properties / customHeaders / items / properties / name / description
      Added value: +"Custom header name sent with webhook deliveries."
    • addedInput schema / properties / eventNotificationRules / items / properties / targetConfiguration / properties / customHeaders / items / properties / value / description
      Added value: +"Custom header value; treated as sensitive and redacted."
    • changedInput schema / properties / eventNotificationRules / items / properties / targetConfiguration / properties / hmacSha256SigningSecret / description
      Previous value: -"Optional secret for HMAC-SHA256 request signing."New value: +"Optional HMAC-SHA256 signing secret. Treated as sensitive input and redacted from outputs/logs."
    • addedInput schema / properties / eventNotificationRules / items / properties / targetConfiguration / properties / targetType / description
      Added value: +"Only webhook targets are supported."
    • changedInput schema / properties / eventNotificationRules / items / properties / targetConfiguration / properties / url / description
      Previous value: -"The HTTPS URL to deliver notifications to."New value: +"Public https:// webhook URL. localhost, credentials in URLs, private IPs, and non-public DNS targets are rejected before B2 is called."
  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?

Beyond the annotations (destructiveHint=true, readOnlyHint=false), the description adds meaningful behavioral context: confirmation is enforced by policy, webhook URLs are validated for public HTTPS reachability, and echoed URL details, HMAC secrets, and custom-header values are redacted from the response. These behaviors are not derivable from annotations and materially shape agent expectations. The description is consistent with all annotations, so no contradiction.

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 core action, the second gives the read-first workflow and the patch/append warning, and the third discloses permissions, confirmation, URL validation, and response redaction. Critical information is front-loaded and there is zero filler.

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 a destructive write tool with no output schema, the description covers everything an agent needs to invoke it correctly: full-replace semantics, the prerequisite read call, permission and confirmation requirements, URL validation, and response redaction behavior. The schema fully documents all three parameters, so no material gap remains.

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 description coverage is 100%, so the baseline is 3. The description adds value by reinforcing the semantics of eventNotificationRules as a complete desired set ('submit the full desired rule set; this is not a patch or append API'), which tells the agent that omitting a rule deletes it and that a read-first call is required to assemble the payload. The URL-publicity and redaction notes also echo and reinforce the schema's url and secret parameter descriptions.

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: 'Replace the complete B2 event-notification webhook rule set for a bucket.' It clearly differentiates from the read sibling b2_get_bucket_notification_rules by emphasizing this is a full replacement, not a patch or append API, so an agent can select it correctly without opening the schema.

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?

It explicitly prescribes the workflow ('Use b2_get_bucket_notification_rules first and submit the full desired rule set') and names the exclusion condition ('this is not a patch or append API'), so the agent knows partial edits are out of scope. It also states the required permission (writeBucketNotifications) and the destructive-confirmation precondition, leaving no ambiguity about 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.