Skip to main content
Glama

Upload an image or video

upload_image

Upload an image or video to YourImageShare and get back a shareable link. Accepts JPG, PNG, GIF, WEBP, AVIF, BMP, TIFF, HEIC/HEIF images and MP4, WEBM, AVI, MOV, M4V, MKV, MPEG, WMV, FLV, 3GP video. Provide exactly one of: url for a public link the server downloads itself (up to 200MB), or base64 + filename for in-memory content (up to 15MB). Uploading a file your account already uploaded returns that upload with duplicate: true. Works without an API key too (anonymous, like the website: unlisted or private only, lower limits, deleted only through the returned delete_url). Returns three URLs for the same upload: a raw storage link (path), a direct embeddable link (src) and a shareable page link (direct). Errors (oversized/unsupported file, bad API key, rate limit) come back as a normal tool error.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "upload_image"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlNoPublic http(s) link to an image or video; the server downloads it (up to 200MB).
titleNoTitle shown on the upload page (up to 90 characters).
base64NoBase64-encoded file contents (a data: URL also works), up to 15MB. Requires `filename`.
filenameNoFilename with extension, e.g. chart.png. Required with `base64`.
expiresInNoAuto-delete after this many seconds (60 to 31,536,000 = 1 year). Omit for a permanent upload.
visibilityNounlisted (default): file and page work for anyone with the link, not listed. private: file only - the page link sends everyone but the owner to the file. public: listed on the site and indexable.
descriptionNoDescription (up to 500 characters).
allowDuplicateNoStore a new copy even if this account already uploaded the exact same file.

Output Schema

NameRequiredDescriptionDefault
idYesUnique identifier for this upload. Pass to get_upload / update_upload / delete_upload.
srcYesPermanent direct/embeddable file URL - use this for <img>/<video> src attributes and when saving the link.
pathYesStorage URL of the file as uploaded. It can change shortly afterwards when the file is converted (WebP/MP4) - store `src` instead.
sizeNoFile size in bytes as stored.
typeYes
thumbNo280px wide WebP thumbnail (for a video, its first frame), or null.
titleNoTitle, or null.
widthNoWidth in pixels, or null if unknown.
directYesThe shareable page URL (title, description, comments, share buttons). Despite the field name, this is NOT a direct file link - use `src` for that.
heightNoHeight in pixels, or null if unknown.
lockedNoTrue if the upload is password-protected.
duplicateNoTrue if this exact file was already on your account and that upload was returned.
delete_urlNoNew uploads only: a private link that deletes the upload without an API key. Shown once - give it to the user if they may want it.
expires_atYesISO 8601 auto-delete timestamp, or null if the upload never expires.
visibilityNoprivate: file only, no page for others. unlisted: file and page work for anyone with the link. public: listed on the site.
descriptionNoDescription, or null.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the annotations: dedupe behavior and the `duplicate: true` marker, anonymous-mode limitations (unlisted/private only, lower limits), the fact that anonymous uploads are deletable only via the returned `delete_url`, and that oversized/unsupported files, bad keys and rate limits surface as normal tool errors. These are exactly the operational facts an agent needs before calling a write tool.

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-loads purpose and return value, then the input modes, then the dedupe and anonymous caveats. The long codec enumeration is useful but slightly bloats the middle, and the 200MB/15MB limits are repeated from the schema descriptions.

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?

An output schema exists, yet the description still names the three returned URLs (`path`, `src`, `direct`), covers expiry/visibility implications via the caveats, and documents error behavior. Nothing material is missing for an 8-parameter upload tool.

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?

Schema coverage is 100%, so the baseline is 3, but the description adds a genuine cross-parameter constraint the schema cannot express: exactly one of `url` or `base64` + `filename` (the schema declares zero required parameters). That resolves real ambiguity about how to satisfy the input.

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 and resource ('Upload an image or video to YourImageShare') plus the outcome ('get back a shareable link'), which cleanly separates it from delete_upload, get_upload, update_upload and list_uploads. The accepted format list further pins down what the tool operates on.

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 explicit mode selection ('Provide exactly one of: url ... or base64 + filename') with size thresholds for each path, and explains the anonymous no-API-key mode and its restrictions. It does not explicitly route to siblings (e.g. 'use list_uploads to find an upload later'), so it stops short of full alternative guidance.

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.