Skip to main content
Glama

Upload Media

upload_media
Destructive

Upload images, videos or documents to AdaptlyPost storage and return public URLs for the mediaUrls of create_post, update_post, or bulk_schedule_posts. Three sources, combinable in one call: attachments (files the user attached in a ChatGPT conversation, which ChatGPT passes as file references; use this for every file attached in ChatGPT, whatever its size), urls (public https URLs the server streams straight into storage; private, internal and non-https addresses are refused) and files (base64 data, for small media attached in other apps; 30 MB decoded per call in total). Omitting all three returns an error. Accepts JPEG, PNG, WebP, GIF, MP4 and QuickTime, plus PDF, PPT, PPTX, DOC and DOCX for LinkedIn DOCUMENT posts, checked by file content (and, for Office files, the extension, so keep it in the name or URL); 50 MB per image, 100 MB per document, 250 MB per attachment or URL download. Stored files are public immediately, post or no post, so only upload media the user supplied or asked for. For base64 files over 30 MB use get_upload_urls and PUT the bytes yourself. Returns uploaded ({ publicUrl, key } per file) and mediaUrls; pass mediaUrls straight into the post. One publicUrl may be reused across any number of posts; the file is kept until the last post referencing it has published, so upload once and reuse rather than re-uploading per post.

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_media"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlsNoPublic https URLs of images, videos or documents to upload (e.g. ["https://example.com/photo.jpg", "https://example.com/deck.pdf"])
filesNoDirect file uploads as base64, 30 MB decoded per call in total. Use this for small media attached in apps other than ChatGPT; in ChatGPT use attachments
attachmentsNoFiles the user attached in the ChatGPT conversation: images, videos or documents, up to 250 MB each. ChatGPT fills in each file reference; put every attached file the user wants to post here
workspaceIdNoWorkspace to act in: an id from list_workspaces. Omit to act in the workspace list_workspaces marks current. Use the same workspaceId for every call about the same workspace, since ids from one workspace (accounts, posts, uploads) do not exist in another

Output Schema

NameRequiredDescriptionDefault
resultYesAn object with uploaded (array of { publicUrl, key } per file) and mediaUrls (the public URLs ready to pass to create_post).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changed
    • changedInput schema / properties / attachments / items / properties / file_name / description
      Previous value: -"Name of the attached file, with its extension"New value: +"Name of the attached file, with its extension. The stored file is named after it; when omitted, the last segment of download_url is used instead, and a PPT, PPTX, DOC or DOCX file whose URL has no extension is then refused"
    • changedInput schema / properties / attachments / items / properties / file_name / type
      Previous value: -[
      -  "string",
      -  "null"
      -]New value: +"string"
    • changedInput schema / properties / attachments / items / properties / mime_type / description
      Previous value: -"MIME type of the attached file"New value: +"MIME type ChatGPT reports for the file. Informational only: the stored type is detected from the file content"
    • changedInput schema / properties / attachments / items / properties / mime_type / type
      Previous value: -[
      -  "string",
      -  "null"
      -]New value: +"string"
    • addedOutput schema / properties / result / additionalProperties
      Added value: +false
    • addedOutput schema / properties / result / properties
      Added value: +{
      +  "mediaUrls": {
      +    "items": {
      +      "type": "string"
      +    },
      +    "type": "array"
      +  },
      +  "uploaded": {
      +    "items": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "key": {
      +          "type": "string"
      +        },
      +        "publicUrl": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "publicUrl",
      +        "key"
      +      ],
      +      "type": "object"
      +    },
      +    "type": "array"
      +  }
      +}
    • addedOutput schema / properties / result / required
      Added value: +[
      +  "uploaded",
      +  "mediaUrls"
      +]
    • addedOutput schema / properties / result / type
      Added value: +"object"
    • addedOutput schema / required
      Added value: +[
      +  "result"
      +]
  2. Changed1 schema field changed
    • changedInput schema / properties / files / items / properties / mimeType / enum
      Previous value: -[
      -  "image/jpeg",
      -  "image/png",
      -  "image/webp",
      -  "video/mp4",
      -  "video/quicktime",
      -  "application/pdf",
      -  "application/vnd.ms-powerpoint",
      -  "application/vnd.openxmlformats-officedocument.presentationml.presentation",
      -  "application/msword",
      -  "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
      -]New value: +[
      +  "image/jpeg",
      +  "image/png",
      +  "image/webp",
      +  "image/gif",
      +  "video/mp4",
      +  "video/quicktime",
      +  "application/pdf",
      +  "application/vnd.ms-powerpoint",
      +  "application/vnd.openxmlformats-officedocument.presentationml.presentation",
      +  "application/msword",
      +  "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
      +]
  3. Changed2 schema fields changed
    • addedInput schema / properties / attachments
      Added value: +{
      +  "description": "Files the user attached in the ChatGPT conversation: images, videos or documents, up to 250 MB each. ChatGPT fills in each file reference; put every attached file the user wants to post here",
      +  "items": {
      +    "additionalProperties": true,
      +    "properties": {
      +      "download_url": {
      +        "description": "Temporary download URL of the attached file",
      +        "type": "string"
      +      },
      +      "file_id": {
      +        "description": "ChatGPT file id of the attached file",
      +        "type": "string"
      +      },
      +      "file_name": {
      +        "description": "Name of the attached file, with its extension",
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "mime_type": {
      +        "description": "MIME type of the attached file",
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      }
      +    },
      +    "required": [
      +      "download_url",
      +      "file_id"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • changedInput schema / properties / files / description
      Previous value: -"Direct file uploads as base64, 30 MB decoded per call in total. Use this when the user attaches/pastes an image, video or document in the conversation"New value: +"Direct file uploads as base64, 30 MB decoded per call in total. Use this for small media attached in apps other than ChatGPT; in ChatGPT use attachments"
  4. Changed2 schema fields changed
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
    • removedOutput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
  5. Changed1 schema field changed
    • changedInput schema / properties / workspaceId / description
      Previous value: -"Workspace to act in: an id from list_workspaces. Omit to use the default workspace. Use the same workspaceId for every call about the same workspace, since ids from one workspace (accounts, posts, uploads) do not exist in another"New value: +"Workspace to act in: an id from list_workspaces. Omit to act in the workspace list_workspaces marks current. Use the same workspaceId for every call about the same workspace, since ids from one workspace (accounts, posts, uploads) do not exist in another"
  6. Changed1 schema field changed
    • addedInput schema / properties / workspaceId
      Added value: +{
      +  "description": "Workspace to act in: an id from list_workspaces. Omit to use the default workspace. Use the same workspaceId for every call about the same workspace, since ids from one workspace (accounts, posts, uploads) do not exist in another",
      +  "type": "string"
      +}
  7. Changed4 schema fields changed
    • changedInput schema / properties / files / description
      Previous value: -"Direct file uploads as base64, 30 MB decoded per call in total. Use this when the user attaches/pastes an image or video in the conversation"New value: +"Direct file uploads as base64, 30 MB decoded per call in total. Use this when the user attaches/pastes an image, video or document in the conversation"
    • changedInput schema / properties / files / items / properties / fileName / description
      Previous value: -"File name with extension (e.g. \"photo.jpg\")"New value: +"File name with extension (e.g. \"photo.jpg\" or \"deck.pptx\")"
    • changedInput schema / properties / files / items / properties / mimeType / enum
      Previous value: -[
      -  "image/jpeg",
      -  "image/png",
      -  "image/webp",
      -  "video/mp4",
      -  "video/quicktime"
      -]New value: +[
      +  "image/jpeg",
      +  "image/png",
      +  "image/webp",
      +  "video/mp4",
      +  "video/quicktime",
      +  "application/pdf",
      +  "application/vnd.ms-powerpoint",
      +  "application/vnd.openxmlformats-officedocument.presentationml.presentation",
      +  "application/msword",
      +  "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
      +]
    • changedInput schema / properties / urls / description
      Previous value: -"Public https URLs of images or videos to upload (e.g. [\"https://example.com/photo.jpg\"])"New value: +"Public https URLs of images, videos or documents to upload (e.g. [\"https://example.com/photo.jpg\", \"https://example.com/deck.pdf\"])"
  8. Changed1 schema field changed
    • changedInput schema / properties / files / description
      Previous value: -"Direct file uploads as base64. Use this when the user attaches/pastes an image or video in the conversation"New value: +"Direct file uploads as base64, 30 MB decoded per call in total. Use this when the user attaches/pastes an image or video in the conversation"
  9. Changed1 schema field changed
    • changedInput schema / properties / urls / description
      Previous value: -"Public URLs of images or videos to upload (e.g. [\"https://example.com/photo.jpg\"])"New value: +"Public https URLs of images or videos to upload (e.g. [\"https://example.com/photo.jpg\"])"
  10. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true and openWorldHint=true, and the description adds the crucial consequence: stored files are public immediately, post or no post, so only upload user-supplied media. It also discloses retention ('kept until the last post referencing it has published'), reuse semantics, per-type size caps, and that type validation is by content plus extension for Office files.

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?

Purpose and the three sources are front-loaded, and nearly every sentence carries a constraint an agent needs. It is a single dense block, though; the size limits and format list would scan faster as a short list, and a few clauses (e.g. the Office extension caveat) are repeated in spirit.

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?

For a four-parameter, multi-source upload tool with a destructive/public side effect, the description covers source selection, limits, validation, retention, reuse and the error case. An output schema exists, and the description still names the returned fields (uploaded with publicUrl/key, and mediaUrls) so the agent knows what to pass downstream.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, yet the description still adds decision-relevant meaning: which source to pick and why, the 30 MB decoded aggregate cap on files, the 250 MB per-attachment/URL ceiling, the https-only and no-private-address rule for urls, and the extension requirement for Office files. This goes well past restating 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?

States a specific verb and resource ('Upload images, videos or documents to AdaptlyPost storage') plus the outcome ('return public URLs'), and ties the output to the exact fields of create_post, update_post and bulk_schedule_posts. An agent can distinguish it from get_upload_urls 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?

Explicitly routes between the three sources: attachments for anything attached in ChatGPT regardless of size, urls for public https addresses, files for small base64 media from other apps. It also names the alternative for large base64 ('use get_upload_urls and PUT the bytes yourself') and states the failure condition when all three are omitted.

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