Skip to main content
Glama

Create media upload

create_upload

Returns a private, short-lived upload URL for a file that has no public HTTPS link (a carousel PDF, an image, or an mp4). The file is sent with an HTTP PUT of its raw bytes to upload_url using the returned headers; the returned upload_id is then accepted by save_draft as media: [{ upload_id }] (an image item can add alt_text there), with id to attach it to an existing draft or scheduled post. The URL expires soon (expires_in gives the seconds left; it can be as little as 60), so upload right away. Limits: images 5MB, PDF 100MB, video mp4 from 75KB up to max_bytes in the result: up to 5GB where PostPen’s large-video storage is set up (the upload_id then starts with r2: and the video gets the same Instagram and Threads copies as one uploaded in PostPen), otherwise 200MB. A video larger than max_bytes has to be trimmed or compressed first.

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": {
      "type": "<type>"
    },
    "name": "create_upload"
  }
}

Input Schema

NameRequiredDescriptionDefault
typeYesWhat you will upload: image (jpeg, png, webp, gif), video (mp4), or document (pdf).
size_bytesNoOptional file size in bytes, checked against the limit before you upload.
content_typeNoOptional MIME type, for example image/png, video/mp4, or application/pdf. Defaults from type.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only declare that this is a non-read-only, non-idempotent, non-destructive write. The description adds substantial behavioral context beyond that: the URL is private and short-lived (as little as 60 seconds per expires_in), size ceilings vary by type and backend (5MB images, 100MB PDF, 200MB standard video, up to 5GB where large-video storage exists), and r2:-prefixed upload_ids receive the same Instagram/Threads copies as native uploads.

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?

The critical fact (private, short-lived URL for files lacking a public link) is front-loaded, and the follow-on steps come in workflow order. It is dense but nearly every clause carries actionable information; the large-video/r2 explanation is the one passage that could be tightened.

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, so the description must describe the return value itself, and it does: upload_url, headers, upload_id, expires_in, max_bytes, and the r2: prefix convention. Combined with the expiry warning and size limits, an agent has everything needed to call this tool correctly and hand off to save_draft.

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 earns an extra point by giving the parameters operational meaning: the type choice determines which size ceiling applies (5MB/100MB/200MB/5GB) and size_bytes is checked against max_bytes before upload. It does not restate the enum values or MIME defaults, leaving those to the schema.

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?

Opens with a specific verb, resource and scope: "Returns a private, short-lived upload URL for a file that has no public HTTPS link", then enumerates accepted file kinds. It clearly separates this tool from save_draft, which is named as the consumer of the returned upload_id.

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?

Explicitly states the trigger condition (no public HTTPS link), the required next steps (HTTP PUT of raw bytes with the returned headers, then pass upload_id to save_draft as media: [{ upload_id }], optionally with id to attach to an existing draft or scheduled post). It also gives a negative case: a video larger than max_bytes must be trimmed or compressed first.

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