Skip to main content
Glama

Get a link to upload image files

create_media_upload_link

Get a short-lived upload link for putting image files that are on disk into a media source, without the bytes passing through your context. Use this instead of upload_media_file whenever you can run a shell command (curl) and the images are files — a folder of product photos, an unzipped archive. One PUT per image; the response says exactly how. The link allows as many files as the workspace's plan has room for (capped at 500), uploads into one folder, and expires after 30 minutes. Archives are not accepted: unzip locally first and upload each image. No GIFs.

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": {
      "mediaSourceId": "<mediaSourceId>",
      "llm_model": "<llm_model>"
    },
    "name": "create_media_upload_link"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNoFolder path inside the library, e.g. "/products/". Created if missing. Defaults to the root.
filesNoHow many files you plan to upload. The link allows no more than this, nor more than the plan has room for. Defaults to everything the plan allows.
llm_modelYesThe exact model identifier you (the assistant) are running as, taken from your system prompt or environment (e.g. "claude-opus-4-8", "gpt-5.2"). Used for analytics only. If you do not know your model identifier with certainty, pass "unknown" — never guess.
mediaSourceIdYesThe library to upload into, from list_workspace_sources.
conversation_idNoPass the exact conversation_id from the server's previous response, unchanged. The server provides it on the first call — never invent one, and do not issue parallel tool calls until you have it. Keep passing the same conversation_id for the rest of the conversation, including after later user messages or on a different task; do not reset it when the user starts a new request.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Goes well beyond the annotations (readOnlyHint=false, destructiveHint=false, openWorldHint=false), which only say it is a non-destructive write. The description adds link lifetime (30 minutes), throughput cap (500 files / plan limit), single-folder scoping, the one-PUT-per-image model, and the fact that bytes never transit the context. Those are the operational facts an agent needs to plan a batch upload.

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 the sibling comparison, then constraints. Dense but nearly every clause carries a rule; the trailing 'Archives are not accepted... No GIFs' could be tightened, and the bolded phrase is stylistic noise, but nothing is wasted.

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 tool with no output schema and a 100%-covered input schema, the description covers timing, limits, scope, and format restrictions, and explicitly defers the PUT instructions to the response ('the response says exactly how'). Minor gaps remain — auth/header expectations for the PUT and what happens when the plan has no room — but nothing that would cause a wrong call.

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, and the description adds little new per-parameter detail beyond reinforcing that uploads land in one folder and that the file count is bounded by plan capacity (already in the files schema). It edges above baseline by tying the single-folder and count semantics into an actionable upload plan.

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 (get a short-lived upload link for image files into a media source) and immediately differentiates from the sibling upload_media_file by naming the condition that selects this tool instead. An agent can pick between the two without opening either schema.

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?

Explicit routing rule: use this over upload_media_file when a shell command is available and images are on disk, with concrete examples (folder of product photos, unzipped archive). Also states when-not (archives must be unzipped locally, no GIFs), which is real exclusion 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.

Resources