Skip to main content
Glama

Upload image or file

upload_asset

Add an image, icon, PDF, font or video to the draft, from a public URL or base64 data. Reference it in pages as "/". Photos (JPG, PNG, WebP, up to 20 MB from a URL) are cleaned up automatically: turned upright, location and camera data removed, resized to at most 2000 px, and smaller WebP copies made that phones load automatically.

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

Input Schema

NameRequiredDescriptionDefault
urlNo
pathYese.g. "img/hero.jpg"
siteYesSite slug (e.g. "kopitiam-muar") or id
base64No

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, openWorldHint=true, and destructiveHint=false, but the description adds substantive behavior beyond them: automatic cleanup of photos (orientation fix, EXIF/location stripping, 2000 px resize, WebP derivatives for phones) and a 20 MB cap for URL sources. It does not say what happens if the target path already exists (overwrite? error?) or whether the call is idempotent, which matters for a write tool hitting an external URL.

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?

Front-loaded with the core action and accepted inputs, then the reference convention, then processing side effects. The final sentence is long and packs five behaviors into one clause, but every detail is load-bearing for an agent deciding whether to upload.

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, the description hints at the return value by noting assets are referenced as '/<path>'. Combined with the disclosed image-processing pipeline and size limits, an agent has enough to call it, though the unspecified url-vs-base64 requirement and the missing overwrite/error behavior are real gaps.

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 coverage is 50%: 'path' and 'site' are documented in the schema, while 'url' and 'base64' have no schema descriptions. The description partially compensates by framing url/base64 as the two source options and noting the URL must be public, but it never states that at least one source is required, whether the two are mutually exclusive, or which takes precedence if both are supplied.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Add an image, icon, PDF, font or video to the draft') plus the two supported sources (public URL or base64) and the accepted file types. It does not distinguish itself from siblings like add_image or write_file, which plausibly overlap, so the agent must guess which upload path to take.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives useful in-context guidance on how the asset is consumed afterwards ('Reference it in pages as "/<path>"') and states the 20 MB URL constraint. It never says when to prefer this over add_image, get_upload_link, or write_file, and gives no prerequisite that a draft/site must exist, so selection guidance is only implied.

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