Skip to main content
Glama

upload_asset

Upload, import, or reuse private workspace input media and obtain a reusable assetKey for generation inputs. Choose source: "url" (import a public HTTPS file; requires url, type, idempotencyKey), "job_output" (reuse a prior OpenGen job output; requires sourceJobId, idempotencyKey, optional outputIndex), "presign_prepare" (reserve a presigned PUT URL up to 100 MiB for local agents; requires mediaType, size), "presign_complete" (finalize a presigned PUT; requires key), or "base64" (last-resort inline bytes strictly capped at 64 KiB; requires mediaType, dataBase64, idempotencyKey). For hosted chat attachments, use upload_attachment.

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

Input Schema

NameRequiredDescriptionDefault
keyNoAsset key returned by presign_prepare (required when source="presign_complete").
urlNoPublic HTTPS media URL (required when source="url").
sizeNoExact byte length up to 100 MiB (required when source="presign_prepare").
typeNoExpected media category (required when source="url").
sourceYesUpload source mode.
mediaTypeNoExact MIME type (required when source="presign_prepare" or source="base64").
dataBase64NoStandard base64-encoded file bytes strictly capped at 64 KiB (required when source="base64").
outputIndexNoZero-based output index for source="job_output" (default 0).
sourceJobIdNoCompleted OpenGen job UUID (required when source="job_output").
idempotencyKeyNoStable caller-generated unique key (1–200 chars; required for source="url", "job_output", and "base64").

Schema Changelog

Changes observed during successful MCP inspections.

No schema history has been recorded yet.

TDQS

A4.4/5.0
Behavior4/5

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

Adds substantial behavior beyond the annotations: per-mode required fields, a 100 MiB reservation cap for presigned PUTs, and a hard 64 KiB inline-bytes cap that steers agents away from base64 for large media. It does not state auth/permission requirements or what happens when the same media is uploaded twice, and the required idempotencyKey on url/job_output/base64 sits in mild tension with idempotentHint=false (which most plausibly describes the presign modes), but that is not a direct contradiction.

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?

Purpose and payoff are front-loaded in the first sentence, followed by a compact mode-by-mode enumeration with quoted enum values. Dense but every clause carries a distinct constraint; nothing is padded.

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 10-parameter, five-mode tool with no output schema, the description covers mode selection, per-mode requirements, and size limits well; the assetKey return is named. It stops short of describing the response shape of presign_prepare (where the PUT URL comes from) and auth prerequisites, which an agent may still need.

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

Parameters3/5

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

Schema description coverage is 100% and every parameter's conditional ('required when source=...') is already documented in the schema, so the description largely restates structured data. Its added value is consolidating the five mode-to-parameter mappings in one place and flagging outputIndex's default of 0; the baseline 3 is appropriate.

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?

States a specific verb set (upload/import/reuse), the resource (private workspace input media), and the outcome (a reusable assetKey for generation inputs). It also explicitly carves itself apart from the sibling upload_attachment by scoping that tool to hosted chat attachments.

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?

Gives explicit when-to-use guidance per mode: url for public HTTPS files, job_output for reusing a prior OpenGen job result, presign_prepare/presign_complete for local agents doing a PUT, and base64 as a 'last-resort' capped path. It also names the alternative tool (upload_attachment) and the condition that selects it.

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