Skip to main content
Glama

Upload folder

upload_folder

Upload a local directory and its contents to Swarm decentralized storage. For large folders, starts a background upload and returns a tag ID to track progress until the manifest reference is ready.

Instructions

Upload a folder (directory). Use this tool whenever the user mentions "folder", "directory", "the contents of", or asks to upload a path that refers to a directory rather than one file — including phrasings like "upload to Swarm folder ", where is the folder to upload, not a destination. Prefer this tool over upload_file when it is unclear whether a given path is a file or a directory: upload_file cannot upload a directory. folderPath is REQUIRED — pass the folder path from the user's message verbatim. Small folders upload synchronously and return the manifest reference. Large folders (over the server's deferred-upload threshold) upload in the background and return only a tagId; unlike upload_file, a folder's reference cannot be computed up front, so retrieve it by polling query_upload_progress with that tagId until processedPercentage is 100. Optional options (ignore if they are not requested): redundancyLevel: redundancy level for fault tolerance. Optional, value is 0 if not requested. postageBatchId: The postage stamp batch ID which will be used to perform the upload, if it is provided.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
folderPathYesRequired. Path to the local folder to upload, taken verbatim from the user's message. Do not ask the user to confirm or re-enter the path when one was already given.
postageBatchIdNoThe id of the batch which will be used to perform the upload.
redundancyLevelNoredundancy level for fault tolerance (higher values provide better fault tolerance but increase storage overhead) 0 - none, 1 - medium, 2 - strong, 3 - insane, 4 - paranoid

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.9.5

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations provided, the description carries the full behavioral burden, and it does so well. It discloses both synchronous behavior (small folders return a `reference`) and asynchronous behavior (large folders return a `tagId` and require polling `query_upload_progress` until processedPercentage is 100). This gives the agent the operational knowledge needed to handle either path correctly.

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?

The description is longer than average, but every sentence serves a purpose: trigger phrases, sibling differentiation, sync/async behavior, polling, and parameter usage. Some minor redundancy exists (e.g., 'Optional options' and 'ignore if they are not requested'), but the overall structure is front-loaded with purpose and usage before deferring to parameter details.

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 that there is no output schema and no annotations, the description covers everything an agent needs to call the tool correctly: required path, sync/async return semantics, how to retrieve the eventual reference, and how to treat optional parameters. It also handles nuanced user phrasings that might otherwise route the agent to `upload_file`.

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 schema already covers 100% of parameters, so the baseline is 3. The description adds meaningful operational semantics beyond the schema: `folderPath` must be passed verbatim, optional parameters should be ignored unless requested, redundancyLevel defaults to 0, and postageBatchId is only used if provided. This lifts the score above baseline.

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's function: 'Upload a folder (directory)' and goes beyond by explicitly naming the sibling tool `upload_file` as the alternative when the path is a file. It even lists phrasing triggers like 'folder', 'directory', and 'the contents of', making the distinction unmistakable.

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 provides explicit when-to-use guidance: 'Use this tool whenever the user mentions "folder", "directory", ...' and says to prefer it over `upload_file` when the path type is unclear. It also instructs not to ask for confirmation or re-entering the path, and to ignore optional parameters if not requested.

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