Skip to main content
Glama

upload_asset

Create and upload an asset in a single call, handling the complete multipart upload flow to return a ready-to-use asset.

Instructions

Create an asset AND upload its bytes in one call.

This is the real upload path: it runs the full multipart flow
(init -> PUT parts -> finalize) and returns a ready, downloadable asset.
Prefer this over the deprecated create_*_asset tools, which only
register an empty record and fail against the current backend.

Provide the file via exactly one of:
  - source_url: an http(s):// URL the server downloads, or
  - base64_content: base64-encoded bytes (best for small files).

workspace_id: target workspace ID — get available IDs from list_workspaces()
extension: file extension without the dot (e.g. "pdf", "png", "mp4").
    Inferred from source_url or name when omitted.
asset_type: "Image", "Video", or "File". Auto-detected from the extension
    when omitted.
width / height: image dimensions in pixels. Auto-detected from the file
    header for common image formats; pass explicitly otherwise.
media_type: optional mediaType integer for Video uploads.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
widthNo
heightNo
extensionNo
asset_typeNo
media_typeNo
source_urlNo
workspace_idYes
base64_contentNo
hub_profile_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.18

TDQS

A4.8/5.0
Behavior5/5

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

The description discloses the underlying multipart flow (init -> PUT -> finalize), explains that source URLs are downloaded by the server, and notes auto-detection for extension, asset_type, and dimensions. It accurately reflects a write operation without being destructive, matching the annotations.

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 efficient: a clear one-sentence purpose, a short contrast with deprecated alternatives, and bullet-like parameter notes. It conveys substantial detail without unnecessary verbosity.

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?

Given the tool has 10 parameters and no output schema, the description covers the essential workflow and most parameter semantics. It could be slightly more complete by explaining hub_profile_id and indicating the expected response shape, but it is sufficient for typical use.

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 description adds meaningful semantics for most parameters: source_url, base64_content, workspace_id, extension, asset_type, width/height, and media_type. It clarifies constraints and inference rules beyond the schema. However, hub_profile_id is a required parameter but is not explained in the description, leaving a minor gap.

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 creates and uploads an asset in one call, explicitly says it is the 'real upload path', and distinguishes it from deprecated create_*_asset tools that only register empty records. This makes the intent and scope unambiguous.

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 gives explicit guidance to prefer this over deprecated alternatives, explains the exact input requirements (exactly one of source_url or base64_content), and mentions auto-detection behavior. It also points to list_workspaces() for obtaining valid workspace IDs, giving actionable instructions.

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

Deploy Server

Other Tools