Skip to main content
Glama

Get asset upload URL

asset_upload_url

Upload any binary asset (images, fonts, PDF, video) up to 20 MiB: get the file size with wc -c < file, call this tool with that size, then run the returned curl command exactly as given. It returns a short-lived (15 min) signed PUT URL. Allowed types: png, jpeg, gif, webp, svg, pdf, woff/woff2/ttf/otf fonts, mp4, webm, csv, json, plain text, markdown, css, javascript. After the PUT succeeds, reference the asset from artifact HTML as /_blob/. Text assets (SVG, CSV, JSON, CSS, JS) should instead be written as artifact files with write_files.

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": {
      "id": "<id>",
      "filename": "<filename>",
      "contentType": "<contentType>",
      "size": "<size>"
    },
    "name": "asset_upload_url"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYes
sizeYes
filenameYes
contentTypeYes

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?

Beyond annotations, the description discloses the signed PUT URL is short-lived (15 min), the 20 MiB limit, the full allowlist of content types, and the required post-upload reference path /_blob/<id>. It also warns that the curl command must be run 'exactly as given', which is meaningful operational context not captured by readOnlyHint/destructiveHint.

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?

The description is a single dense paragraph that front-loads the core action and workflow before listing allowed types and the alternative tool. Every sentence adds useful information, though the block of format names could be slightly tighter.

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 no output schema and only minimal annotations, the description carries most of the burden, and it covers the upload flow, URL expiry, allowed types, and asset referencing well. The only notable gap is the unexplained semantics of the `id` and `filename` inputs.

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 0%, so the description must compensate. It does explain the `size` parameter's derivation ('get the file size with wc -c') and enumerates valid `contentType` values, but it never clarifies what `id` or `filename` should contain, leaving half the required parameters ambiguous.

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 states a specific verb and resource ('Upload any binary asset') and immediately scopes it with concrete formats and a size ceiling. It also distinguishes itself from the sibling write_files by explicitly routing text-based assets there instead.

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 provides an explicit three-step workflow (wc -c, call tool with size, run the returned curl exactly) and a clear when-not-to-use rule: 'Text assets (SVG, CSV, JSON, CSS, JS) should instead be written as artifact files with write_files.' This leaves little to inference.

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