Skip to main content
Glama

upload_asset

Upload a file you have locally as an asset. Give its name, SHA-256 and size; if the workspace already has that content, it's recorded without uploading. Otherwise you get an upload to make (method, URL, headers): make it, then call upload_asset again with the same arguments to record the asset. A file over 100 MiB gets a multipart upload instead: PUT each part to its URL, keep the ETag header each PUT returns, then call upload_asset again with the same arguments plus multipart (its upload_id and every part's part_number and etag). For a file still being written, such as a recording, leave out the SHA-256 and size: you get a multipart upload to PUT parts to as the file grows, every part but the last part_size bytes; call again with multipart (its upload_id and from, the next part's number) for more part URLs, and finish with the SHA-256, the size and every part's ETag. For a file on the web, use import_asset.

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": {
      "name": "<name>"
    },
    "name": "upload_asset"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesThe path to record it under, such as `launch/intro.mp4`. Folders are made by naming them.
sizeNoThe file's size in bytes.
sha256NoThe file's SHA-256, lowercase hex. Leave it and `size` out while the file is still being written, such as a recording, to upload it in parts as it grows.
multipartNoThe multipart upload an earlier request answered with. With `sha256` and `size`, it finishes it once every part is up; without them, it asks for more part URLs of an upload of unknown size.
overwriteNoReplace an asset already at this name (the default); false refuses with 409 instead.
project_idNoThe project it belongs to; the workspace's default project when absent.
content_typeNoGuessed from the name's extension when absent.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations declare the safety profile (readOnly=false, openWorld=false, destructive=false), so the bar is lower, yet the description still adds substantial behavior: content-addressed dedup ("if the workspace already has that content, it's recorded without uploading"), the two-phase call-again protocol, the 100 MiB multipart threshold, and the streaming mode for files still being written. This is exactly the multi-step sequencing an agent cannot infer from structured fields.

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?

A single dense paragraph, but it is front-loaded with the simple case and escalates to multipart and streaming in a logical order, and nearly every clause carries protocol information. Slightly heavy for one block; splitting the three modes into distinct sentences or bullets would aid scanning.

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?

For a 7-parameter, multi-round-trip protocol with no output schema, the description covers the full loop: what to send, what comes back (method/URL/headers), how to complete it, and how to re-enter for more parts. It omits the default overwrite behavior and any error/conflict handling, which an agent calling this repeatedly would benefit from knowing.

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?

Schema coverage is 100%, so the baseline is 3, but the description adds meaning the schema cannot: it explains that name is the recording path, that omitting sha256/size selects streaming mode, and that `multipart` is either a finish payload or a request for more part URLs depending on whether sha256/size are present. It does not mention the overwrite/409 behavior, leaving that to the schema.

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?

"Upload a file you have locally as an asset" states a specific verb, resource, and scope (locally-held files), and the closing sentence explicitly carves out the sibling case ("For a file on the web, use import_asset"). An agent can distinguish this from import_asset without opening either schema.

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 gives clear routing conditions: use this for local files, import_asset for web files, and it explains which invocation mode applies based on whether sha256/size are known. It does not address when to prefer other upload-adjacent siblings such as create_upload_token, but the primary alternative is named with its selecting condition.

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.

Resources