Skip to main content
Glama

Reach MCP — LinkedIn for AI agents

upload_media_from_url

Upload an image to LinkedIn by fetching it from a public URL. Returns a digitalmediaAsset URN (urn:li:digitalmediaAsset:…) that can be passed to create_post (single image) or create_multi_photo (multi-photo). Use this instead of upload-media when working as an agent — no binary file upload needed. Use before create_post when the post needs an image; returns the URN create_post expects. For several images, then create_multi_photo.

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": {
      "account_id": "<account_id>",
      "image_url": "<image_url>"
    },
    "name": "upload_media_from_url"
  }
}

Input Schema

NameRequiredDescriptionDefault
page_idNoUpload for this company page (from list_managed_pages); required when the image goes into a post made with the same page_id.
image_urlYesPublicly accessible URL of the image to upload.
account_idYesReach id of the LinkedIn account to act on, from list_accounts.
idempotency_keyNoOptional. A key you choose (a UUID is fine) that names this exact call. If you retry with the same key and the same arguments, the first call's result is returned and nothing is done twice on LinkedIn. Reusing a key with different arguments is refused. Keys expire after 24 hours.
media_upload_typeNoLinkedIn media upload type (default: IMAGE_SHARING).IMAGE_SHARING

Output Schema

NameRequiredDescriptionDefault
urnNourn:li:digitalmediaAsset:… to pass as media_urn

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / page_id
      Added value: +{
      +  "description": "Upload for this company page (from list_managed_pages); required when the image goes into a post made with the same page_id.",
      +  "type": "string"
      +}
  2. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Beyond the write and open-world annotations, it explains that the service fetches a publicly accessible image rather than accepting binary content and produces a LinkedIn asset URN for later calls. It does not discuss failure behavior, asset lifetime, permissions, or rate limits, so it is informative rather than exhaustive.

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 mechanism and result are front-loaded, and the wording is easy to scan. However, the create_post/URN handoff and multi-photo routing are each effectively stated twice; the final sentence is also awkward and could be folded into the earlier workflow guidance.

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?

Together with the rich input schema, output schema, and annotations, the description supplies the remaining operational context: URL-based acquisition, the produced URN, and the correct single- versus multi-image workflow. The schema already covers account and page selection plus retry behavior, leaving no material gap for correct selection and invocation.

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

Parameters3/5

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

Schema coverage is 100%, and all five inputs—including page_id prerequisites and idempotency_key retry semantics—are already documented there. The description's public-URL wording largely repeats the image_url schema and adds no new input syntax or constraints, so the high-coverage baseline applies.

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 opening sentence gives a specific action, resource, platform, and mechanism: uploading an image to LinkedIn by fetching it from a public URL. It also identifies the digitalmediaAsset URN result and distinguishes this URL-based flow from binary upload-media.

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?

It explicitly tells agents to use this instead of upload-media when avoiding binary uploads and to run it before create_post for an image post. It also directs multi-image workflows to create_multi_photo, making both alternative selection and downstream sequencing concrete.

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