Skip to main content
Glama

Get Media Upload URLs

get_upload_urls

Get presigned upload URLs for direct file uploads. Returns uploadUrl (PUT your file here) and publicUrl (use in create_post mediaUrls). This only mints a URL. You MUST PUT the file to uploadUrl and confirm a 2xx response before using publicUrl, otherwise create_post/bulk rejects it with "Media file(s) not found in storage". If the PUT cannot reach uploadUrl, for example a sandbox network proxy answers 403 or the storage host is not on its allowlist, do not retry it and do not stop: hand the files to the user as downloads, call open_upload_widget, and ask the user to add them in the upload box, which returns the mediaUrls. Prefer upload_media for public URLs and for inline files under 30 MB; use this for larger files you hold yourself. For each file, provide fileName and mimeType. Supported types: image/jpeg, image/png, image/webp, image/gif (Facebook, X, Bluesky, Mastodon, LinkedIn and Tumblr only), video/mp4, video/quicktime, and for LinkedIn DOCUMENT posts application/pdf, application/vnd.ms-powerpoint, application/vnd.openxmlformats-officedocument.presentationml.presentation, application/msword and application/vnd.openxmlformats-officedocument.wordprocessingml.document; keep the extension in fileName, since the post reads the file type from it. A publicUrl may be reused across any number of posts; the file is kept until the last post referencing it has published.

Input Schema

NameRequiredDescriptionDefault
filesYesFiles to get upload URLs for
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
resultNoAn object with urls: one { uploadUrl, publicUrl, key } entry per requested file.

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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"
      +]
  2. 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#"
  3. 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"
  4. 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"
      +}
  5. Changed1 schema field changed
    • 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"
      +]
  6. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Goes far beyond the annotations by disclosing the two-step mint-then-PUT workflow, the exact failure mode ('Media file(s) not found in storage'), proxy/allowlist 403 behavior, the no-retry fallback, publicUrl reuse semantics, and retention until the last referencing post publishes. The annotations already mark this as a non-destructive, closed-world operation; the description adds the operational context an agent needs.

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 purpose, return values, and the mandatory PUT confirmation, then moves to fallback and sibling preference. It is dense and largely earns its length given the workflow complexity, though the long sandbox-proxy sentence and the redundant 'provide fileName and mimeType' line 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?

Covers purpose, return semantics (uploadUrl vs publicUrl), mandatory confirmation, failure recovery, alternatives, supported types with platform caveats, and URL reuse lifetime. With an output schema present and 100% schema coverage, nothing material is missing for correct invocation.

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 baseline is 3, but the description adds real meaning: the fileName extension matters because the post reads file type from it, and the supported MIME types carry platform-specific restrictions (GIF only on certain networks, PDF/Office documents only for LinkedIn DOCUMENT posts) not present in the enum. It does not mention the 20-file cap or workspaceId, but both are well documented in 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 precise verb and resource: 'Get presigned upload URLs for direct file uploads,' and immediately clarifies that it only mints a URL rather than performing the upload. This cleanly distinguishes it from upload_media and open_upload_widget.

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 siblings: prefer upload_media for public URLs and inline files under 30 MB; use this for larger self-held files; fall back to open_upload_widget when the PUT cannot reach storage. It also states the mandatory 2xx confirmation before create_post/bulk will accept the publicUrl.

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