Skip to main content
Glama

assets_put

Upload files or inline text directly to project storage. Supports public/private access, immutable content-addressed URLs, and automatic responsive image variants.

Instructions

Upload a blob (file or inline content) to project storage via direct-to-S3. Accepts local_path (any size up to 5 TiB) or content (≤ 1 MB inline). Public blobs get a CDN URL; private blobs require authenticated reads. Use immutable: true to produce a content-addressed URL that never needs cache invalidation. For image uploads (jpeg/png/webp/heic/heif), the gateway also returns width_px/height_px/blurhash/display_url and a variants map (thumb 320w, medium 800w, large 1920w WebP — plus display_jpeg for HEIC sources) so apps can render responsive thumbnails without re-encoding client-side. See the SDK docs for the full AssetRef shape.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYesDestination key (path in the project's blob namespace). No leading slash. Example: 'images/logo.png' or 'circuits/v1.zkey'.
contentNoInline content to upload (UTF-8 string). For small blobs ≤ 1 MB. Mutually exclusive with `local_path`.
metadataNov1.50: caller-provided flat metadata stored alongside the asset. Object with string / number / boolean / string[] leaves; ≤4 KB serialized. Nested objects rejected with INVALID_ASSET_METADATA (HTTP 400).
immutableNoWhen true, the returned URL includes a content-hash suffix so overwrites produce distinct URLs. CLI auto-computes sha256.
local_pathNoPath to a local file to upload. Mutually exclusive with `content`.
project_idYesProject ID
visibilityNoDefault: public. Public blobs get a CDN URL; private blobs require authenticated reads.
exif_policyNov1.50: EXIF retention policy for image uploads. Default 'keep'. 'strip' discards EXIF from the stored bytes and the image_exif response field.
content_typeNoMIME type (auto-detected from file extension if omitted).
Behavior4/5

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

Given no annotations, the description carries the full burden. It discloses key behaviors: file size limits (5 TiB for local_path, 1 MB for content), visibility effects (public CDN URL vs private authenticated reads), and the immutable flag for content-addressed URLs. It also details image processing (returning width/height/blurhash and variants). However, it doesn't mention rate limits, auth requirements, or error handling, which would add completeness.

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 well-structured and front-loaded. The first sentence states the core purpose and mechanism. Subsequent sentences add constraints, features, and image handling details without redundancy. Every sentence earns its place, making it informative yet concise.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With 9 parameters and no output schema, the description covers the tool's behavior comprehensively: input methods, visibility, immutability, and image processing. It also references SDK docs for the AssetRef shape, which is acceptable. However, it could be more complete by mentioning the response format (e.g., returns an asset URL) and potential errors (e.g., invalid exif_policy), but overall it provides sufficient context for an AI agent to use the tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% coverage with descriptions for all 9 parameters. The description adds significant value beyond the schema: it explains size limits (5 TiB for local_path), inline size limit (1 MB for content), the effect of immutable (content-hash suffix), and image processing details (variants map). This contextual information helps the AI agent make informed parameter choices.

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 purpose: 'Upload a blob (file or inline content) to project storage via direct-to-S3.' It specifies the verb (Upload), resource (blob to project storage), and distinguishes from siblings like assets_get, assets_ls, etc., which perform other operations on assets.

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 guidance on when to use the tool (uploading blobs) and details the two input methods (local_path for large files up to 5 TiB, content for inline up to 1 MB). It also covers scenarios like public/private visibility and the immutable flag. While it doesn't explicitly state when not to use it or compare to alternatives, the usage context is well defined.

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/MajorTal/run402'

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