Skip to main content
Glama
ffumero2003

b2-mcp-server

by ffumero2003

Upload a local file to a B2 bucket

b2_upload_file

Uploads a local file to a B2 bucket, returning its stored file id, name, size, and type. The path must be inside B2_UPLOAD_ROOT; duplicate names create new versions.

Instructions

Uploads a file from the local filesystem into a bucket and returns the stored file id, name, size, and type. The local path must sit inside the directory named by B2_UPLOAD_ROOT; uploads are refused otherwise. Uploading an existing name adds a new version rather than replacing the old one.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileNameNoName to store in the bucket. Defaults to the local file name.
localPathYesPath to the local file. Must be inside B2_UPLOAD_ROOT.
bucketNameYesName of the destination bucket.
contentTypeNoMIME type. Omit to let B2 detect it.
Behavior5/5

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

The description adds substantial behavior beyond annotations: it says the tool returns the stored file id, name, size, and type, and explains versioning behavior (adds a new version instead of replacing). It also discloses the root-directory constraint. Annotations only indicate it is not read-only, not idempotent, and not destructive, so the description's extra detail is valuable.

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 tight sentences: first states the core action and return value, second gives a critical path constraint, third explains versioning. No filler or redundancy; every sentence earns its place.

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 4-parameter upload tool with no output schema, the description covers the essential return values, path constraint, and versioning behavior. It gives the agent enough context to invoke the tool correctly and understand consequences, especially since sibling tools are all unrelated to uploading.

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 coverage is 100%, so the schema already documents all four parameters. The description repeats the localPath root restriction that appears in the schema and adds the versioning behavior relevant to fileName, but does not significantly extend parameter understanding beyond the structured definitions.

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 action ('Uploads a file from the local filesystem into a bucket') and the resource ('B2 bucket'), which distinguishes it from sibling tools like b2_list_files, b2_download_file, and b2_delete_file_version. The title and first sentence align, providing a specific verb+resource with no ambiguity.

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: uploading a local file to a bucket, with an explicit prerequisite (path must be inside B2_UPLOAD_ROOT). It does not explicitly mention alternatives or exclusions, but among the sibling tools there is no other upload tool, so the purpose itself guides selection.

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