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". 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, 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

TableJSON 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

TableJSON Schema
NameRequiredDescriptionDefault
resultNoAn object with urls: one { uploadUrl, publicUrl, key } entry per requested file.

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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#"
  2. 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"
  3. 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"
      +}
  4. 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"
      +]
  5. First observed

TDQS

A4.8/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) by disclosing the two-step upload flow, the exact downstream failure mode ('Media file(s) not found in storage'), and the retention/lifecycle rule that a publicUrl survives until the last referencing post publishes. It also flags that the tool 'only mints a URL', preventing the common mistake of assuming upload already happened. No contradiction with annotations.

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 purpose and the critical action, then ordered by relevance (requirement, alternative, per-file params, MIME list, lifecycle). The justification is dense but the long MIME enumeration duplicates the schema enum verbatim, which is the one block that does not earn its place.

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?

Despite an output schema existing, the description still explains what the returned fields are for and how to consume them, plus the constraint set (max 20 files implied, allowed types, extension rule, reuse semantics). Nothing an agent needs to call this correctly and follow through on the second step is missing.

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 description coverage is 100%, so baseline is 3, and the description adds real meaning on top: it tells the agent that fileName and mimeType must be supplied per file, and that the extension in fileName is load-bearing because the post reads file type from it. It also restates the supported MIME set (already in the schema enum) rather than extending it, which caps the score below 5.

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 presigned upload URLs for direct file uploads') and immediately distinguishes the output contract by naming the two returned fields (uploadUrl, publicUrl) and their downstream use. An agent can tell this apart from upload_media 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 names the alternative and the selection condition: 'Prefer upload_media for public URLs and for inline files under 30 MB; use this for larger files you hold yourself.' It also states the hard requirement (PUT to uploadUrl and confirm 2xx) before the URL is usable.

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