Skip to main content
Glama

Add storage

add_storage
Idempotent

Give a project an S3 bucket for files that users upload or download, such as photos or documents. Call it after the first deploy_project, with that project_id; the app restarts with the bucket's variables set (persisted like any env var, so they survive redeploys). The app needs a server (runtime node or python): for each upload the server signs a presigned PUT URL, and for each download a presigned GET URL, with its own key, and the browser sends or fetches the file straight to or from the bucket, never through the app. A static page cannot do this: it has no server to hold the key, and the key must never reach the browser. The app reads S3_ENDPOINT, S3_REGION, S3_BUCKET, S3_ACCESS_KEY_ID, and S3_SECRET_ACCESS_KEY (plus S3_PUBLIC_URL for a public bucket) with any S3 SDK. Pass the values to the S3 client explicitly: SDKs read the AWS_* names on their own, not these. Have the app start without these variables and say so until they are set. Private is the default and the right choice for user files. Pass public: true only for files meant for everyone, such as a public gallery's images: they are then readable by anyone at S3_PUBLIC_URL/, outside the project's gate, so a restricted project with a public bucket gets a warning to relay. Idempotent: calling it again returns the same bucket and changes nothing, public included (set_storage_visibility changes that). Refused if the user set any of those S3_* variables themselves. Each plan caps a project's bucket (Free 500 MiB, Pro 50 GiB, Business 100 GiB), measured once a day: past it the app's key can no longer upload (reads, listings, and deletes still work, and nothing is deleted) until the bucket is back under or its plan allows more, and get_project shows storage.read_only with a note to relay. The persistent data directory (SPAWNPOINT_DATA_DIR) needs no call and suits a SQLite file or files only the app reads; a bucket is for files browsers upload or download, or that must outlive the machine. When the project is terminated the bucket is kept for 7 days with its files, restorable from the console into a project deployed under the same name, then deleted. A file the app overwrites or deletes is kept as an old version for 7 days and counts toward the plan's cap until then.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "project_id": "<project_id>"
    },
    "name": "add_storage"
  }
}

Input Schema

NameRequiredDescriptionDefault
publicNofalse (the default): only the app's own key reads the bucket, and browsers get presigned URLs the app signs. true: anyone can read any object at S3_PUBLIC_URL/<key>, outside the gate; only for files meant for everyone, such as a public gallery
project_idYesthe id of the project

Output Schema

NameRequiredDescriptionDefault
envNo
noteYes
bucketNo
publicNo
statusYes
warningNo
read_onlyNo
project_idYes
public_urlNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior3/5

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

Above the annotation bar: it discloses the app restart and persisted S3_* variables, credential handling, idempotency semantics, refusal when the user set S3_* themselves, per-plan caps with the read-only upload lockout surfaced in get_project, 7-day bucket retention after termination, and 7-day object versioning. The annotations already cover the idempotent/non-destructive profile, so this is additive context rather than load-bearing disclosure, and it is unusually rich for a simple call.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The content largely earns its place for a complex tool, but it is delivered as one dense block with no front-loading of the critical call sequence, and it mixes invocation mechanics, app-side integration instructions, quota policy, and lifecycle retention at equal weight. An agent scanning for "what do I pass and when" must read the whole block.

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 provisioning tool with an output schema, the description covers everything needed: prerequisites, the env vars the app must consume, the private/public decision, quota consequences, and lifecycle behavior. Return values are rightly left to the output schema.

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?

With 100% schema coverage the baseline is 3, but the description adds operational meaning beyond the schema: private is the correct default, public exposes objects at S3_PUBLIC_URL/<key> outside the project gate, and a restricted project with a public bucket yields a warning the agent must relay. Some of this restates the schema's public description, which keeps it below 5.

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?

"Give a project an S3 bucket for files that users upload or download" states a concrete verb and resource, and the file-serving framing distinguishes it from the provisioning siblings (add_database, add_custom_domain) and from upload_to_storage. An agent knows immediately this is bucket provisioning, not a file transfer.

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 names the prerequisite explicitly ("Call it after the first deploy_project, with that project_id"), routes away from a sibling ("set_storage_visibility changes that"), and draws the boundary against the alternative (SPAWNPOINT_DATA_DIR suits SQLite/app-only files; a bucket is for browser-uploaded/downloaded files). That is when-to-use, when-not, and alternatives in one place.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.