Skip to main content
Glama
ffumero2003

b2-mcp-server

by ffumero2003

Report bucket storage used against a budget

b2_bucket_usage
Read-only

Calculate B2 bucket storage usage and compare it to a budget, flagging buckets that exceed a set percentage. Includes all file versions, with unfinished large uploads reported separately.

Instructions

Reports bytes stored per bucket and how that compares to a budget, flagging buckets over the threshold. B2 exposes no usage endpoint, so this is computed by summing every file version, INCLUDING old versions, which B2 also bills for. The figure EXCLUDES parts of unfinished large uploads, which B2 does bill for; those uploads are counted separately as unfinishedLargeFiles, so treat bytesUsed as a floor rather than a total. Omitting bucketName scans every bucket, which costs one transaction per 1000 versions per bucket and is the most expensive call this server makes. A scan is capped at 20 pages per bucket and sets truncated when the cap stops it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bucketNameNoBucket to measure. Omit to scan every bucket.
budgetBytesNoBudget to measure against. Defaults to 10 GiB, B2 free tier.
thresholdPercentNoPercent of budget at which a bucket is flagged. Defaults to 80.
Behavior5/5

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

While annotations already indicate readOnlyHint=true, the description goes far beyond that by explaining critical behavioral nuances: the calculation sums all file versions including old ones, excludes unfinished large upload parts, treats bytesUsed as a floor, and caps scans at 20 pages per bucket. These details are not available in annotations or schema, significantly enhancing the agent's understanding of side effects and limitations.

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 four sentences long, with no fluff. It front-loads the primary purpose, then adds caveats and cost implications. Each sentence provides essential information for correct usage and expectation-setting, making it appropriately sized for the tool's complexity.

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?

Given the absence of an output schema, the description compensates by explaining key output concepts (bytesUsed, unfinishedLargeFiles, truncated) and the operational context (scan cap, cost). It covers all critical aspects an agent needs to correctly invoke and interpret results, making it complete for this tool.

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?

The input schema already provides descriptions for all three parameters (100% coverage), establishing a baseline of 3. The description adds meaningful context beyond the schema, particularly for bucketName: omitting it scans every bucket and incurs the highest cost. It also clarifies the semantics of budgetBytes and thresholdPercent defaults, which are present in the schema but reinforced contextually.

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 clearly states the tool reports bytes stored per bucket against a budget and flags over-threshold buckets. This distinguishes it from sibling tools, which focus on file/bucket listing, upload/download, or deletion. The verb 'Reports' plus specific resource and outcome make the purpose unambiguous.

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 context for when to use the tool, such as noting that omitting bucketName triggers a full scan that is 'the most expensive call this server makes.' It does not explicitly name alternative tools, but the unique purpose among siblings makes the usage context clear. It lacks explicit when-not-to-use guidance, but the cost warning serves as a caution.

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

Install Server

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/ffumero2003/b2-mcp-server'

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