Skip to main content
Glama

Create media upload

create_media_upload

Request an upload URL for media (no token required). By default, upload the whole file with a single PUT; the URL is valid for 15 minutes and the maximum size is 100MB. For files over 100MB, pass multipart:true to use multipart upload (valid for 2 hours; the size limit depends on the plan) and follow the returned instructions. The returned media.id is used as mediaIds in create_draft. (Required scope: cd.media.write)

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": {
      "filename": "<filename>",
      "mime": "<mime>",
      "size": "<size>"
    },
    "name": "create_media_upload"
  }
}

Input Schema

NameRequiredDescriptionDefault
mimeYes
sizeYes
widthNo
heightNo
filenameYes
multipartNoMultipart upload; must be true when the file is larger than 100MB
workspaceIdNoOptional: id of the workspace to operate on (look it up with list_workspaces); if omitted, the default personal workspace is used. A developer API key can only use the workspace it is bound to.
durationSecondsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Annotations only declare it is a non-read-only, non-destructive, non-idempotent write. The description adds the details that actually govern behavior: no token needed for the upload itself, 15-minute URL validity, 100MB cap, 2-hour multipart validity, plan-dependent size limit, and the required cd.media.write scope. These are non-obvious constraints an agent cannot derive from structured fields.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Roughly four sentences, front-loaded with the core action and the default/multipart split before the edge details. Every clause carries a fact the caller needs (validity windows, size caps, scope, follow-up tool); nothing is restated from the title or schema.

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 an 8-parameter write tool with no output schema, the description supplies the time/size contract, the multipart branch, and the meaning of the returned media.id, plus follow-up instructions. Minor omissions remain (what the PUT should carry, what 'returned instructions' look like for multipart), but nothing essential to correct invocation is missing.

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 only 25%, and the description does compensate for the most important parameter by explaining multipart:true and its size threshold. However width, height, durationSeconds, and filename remain unexplained in both places, so roughly half the surface is still opaque. Partial compensation lands at the minimum-viable 3.

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 ('Request an upload URL for media') and immediately ties the result to a downstream use ('The returned media.id is used as mediaIds in create_draft'), which separates it from list_media/delete_media siblings. An agent knows exactly what this call produces.

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 routing logic for the main decision the caller faces: single PUT by default, multipart:true for files over 100MB. It also names the follow-up tool (create_draft) and the required scope. It stops short of stating exclusions or what to do if a sibling like list_media already has a similar file, but guidance is well above 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.