Skip to main content
Glama

upload_media

Upload media and get back a reusable media_id. Two modes: (1) pass url to upload from a publicly accessible URL (preferred for anything over a few MB), or (2) pass data (base64-encoded file bytes) plus mime_type to upload bytes directly from the model context. Supports images (PNG/JPEG), videos (MP4/MOV), and PDFs (application/pdf). A PDF returns a document-kind media_id — pass it to create_post on a LinkedIn account to publish a native LinkedIn document post (PDF carousel); set platform_configurations.linkedin.document_title to control the title. Use the returned media_id with the media param on create_post/update_post. HEIC/HEIF images are not supported — convert to JPEG or PNG first. Direct data uploads are capped at 3MB raw because of serverless request-body limits — for larger files, host at a public URL and use url mode, or upload via the dashboard.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNoPublicly accessible URL of the image or video to upload. Provide either `url` or `data`, not both.
dataNoBase64-encoded file contents. Requires `mime_type`. Capped at 3MB raw (serverless request-body limit). For larger files, host the file at a public URL and pass it as `url` instead. Provide either `data` or `url`, not both.
nameNoOptional filename to store (defaults to the URL's filename, or 'file' for direct uploads)
mime_typeNoRequired when using `data`. One of: image/png, image/jpeg, video/mp4, video/quicktime, application/pdf.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A5/5.0
Behavior5/5

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

Annotations only signal readOnlyHint=false, openWorldHint=true, and destructiveHint=false, so the description carries much of the behavioral burden. It discloses the reusable media_id output, the special PDF document-kind behavior, the base64 vs URL mode trade-offs, format restrictions, and the serverless request-body limit.

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?

The description is dense but well structured: the main outcome and two modes are front-loaded, followed by supported formats, a special PDF case, a usage pointer to create_post/update_post, and explicit limitations. Each sentence adds actionable information without fluff.

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 tool with no output schema, the description is notably complete. It explains both input modes, supported types, the returned media_id, PDF-specific behavior, the 3MB cap, and the conversion requirement for HEIC/HEIF, so an agent has nearly everything needed to invoke it correctly.

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?

Although schema coverage is 100%, the description adds decision-level meaning beyond the parameter docs: which of `url` and `data` to prefer, that `mime_type` is required for `data`, that `data` is capped at 3MB, and what happens for PDF uploads. This materially helps an agent pick and fill parameters correctly.

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?

The description opens with a specific verb and resource: 'Upload media and get back a reusable media_id.' It clearly distinguishes the tool's job from siblings like delete_media and request_upload_link by emphasizing both the upload action and the reusable ID it produces.

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?

The description explicitly tells the agent when to use each mode: use `url` for anything over a few MB, and use `data` for direct bytes. It also gives when-not guidance, such as HEIC/HEIF being unsupported and the 3MB cap, and points to alternatives like hosting at a public URL or uploading via the dashboard.

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.