Skip to main content
Glama

Upload asset

upload_asset
Destructive

Upload an image (PNG, JPEG, GIF, WebP, AVIF, SVG) or a font (TTF, OTF, WOFF, WOFF2) to a workspace (max 10 MB), from a public https URL, a file attached in the chat or base64: fileId's workspace when given, else workspace, else the default workspace. Returns its URL (images: ) or its font class. Fonts: family, weight and style are read from the file (a variable font gets its weight range); fontFamily, fontWeight, fontStyle override them. Uploading bytes already in the workspace returns the existing asset (same id and URL) without reading the file again; fontFamily/fontWeight/fontStyle given then are applied to it (a workspace admin or its uploader only). A font can also be changed without uploading it again.

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
urlNoPublic https URL of the file to fetch.
dataNoOr the file content, base64.
fileNoOr a file the user attached in the chat (ChatGPT fills it in).
nameYesFile name with extension, e.g. logo.png
fileIdNoThe file the assets are for: its workspace's (a file shows the fonts and images of its own workspace).
fontStyleNoFonts: normal or italic instead of the file's.
workspaceNoThe workspace whose assets to use: its id or name (whoami lists them). Default: fileId's workspace, else the default workspace.
fontFamilyNoFonts: family name to use instead of the file's
fontWeightNoFonts: CSS weight instead of the file's, "700", or a range for a variable font, "100 900".

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations declare readOnlyHint=false, destructiveHint=true and openWorldHint=true; the description adds real context beyond them: a 10 MB cap, the return shape, and the notable dedup behavior (re-uploading identical bytes returns the existing asset with the same id and URL without re-reading the file). It also discloses a permission constraint (workspace admin or the uploader only) for applying font overrides to an existing asset. It never explains why destructiveHint is true (e.g., whether an existing asset can be replaced or quota consumed), leaving one behavioral gap.

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 formats, then progressively covering sources, workspace resolution, return values and font overrides. It is dense and semicolon-heavy, and some clauses (workspace precedence) duplicate the schema, but no sentence is purely filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, and the description compensates by stating exactly what is returned (an asset URL rendered as an <img src>, or a font class). It covers formats, size limit, source options, workspace targeting, dedup semantics and font-metadata overrides for a nine-parameter tool with nested objects, which is enough for an agent to call it correctly.

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 100%, so all nine parameters are already documented, and the description largely restates them (workspace precedence, fontFamily/fontWeight/fontStyle overriding the file's values). It does add some meaning the schema lacks, notably that family, weight and style are read from the file and that a variable font yields a weight range. With the schema doing the heavy lifting, the baseline of 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 (upload) and resource (image/font asset) and enumerates the supported formats (PNG, JPEG, GIF, WebP, AVIF, SVG; TTF, OTF, WOFF, WOFF2) and accepted sources. An agent can immediately tell this is the asset-creation tool versus siblings like get_upload_url or update_asset.

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?

Gives concrete conditions for each input path (public https URL, chat attachment, base64) and an explicit resolution precedence for the target workspace: fileId's workspace, else workspace, else the default. It also explains when the override parameters matter versus reading metadata from the file. It does not explicitly name an alternative tool for cases this one doesn't cover, so it stops short of a 5.

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.