Skip to main content
Glama

Add Asset

add_asset

Adds an image, video or PDF to the library from a public URL or a file you hold. A PDF becomes kind document and attaches to LinkedIn posts only. For a public https URL, pass source url plus url. For a local file, three steps with any HTTP client: (1) call with source upload and fileName (mime optional) to get a signed uploadUrl, the headers to send, and a pathname; (2) PUT the raw file bytes to uploadUrl with those headers (for example curl -X PUT -T cover.png), within an hour; (3) call again with source upload and that pathname to save it. Mark reads the type and size from storage. For a file behind a login (a private preview), download it with your own access first, then upload it the same way: Mark never takes your credentials. Related: search_assets, save_post.

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": {
      "source": "<source>"
    },
    "name": "add_asset"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlNoPublic https URL when source is url.
mimeNoUpload step 1, optional: the file's MIME type. Needed when fileName has no extension.
nameNoOptional display name.
sourceYesurl imports a public file; upload signs a PUT link (with fileName) or saves the uploaded file (with pathname).
fileNameNoUpload step 1: the file's name with its extension, such as cover.png.
pathnameNoUpload step 3: the pathname step 1 returned, after the PUT succeeded.

Output Schema

NameRequiredDescriptionDefault
assetNo
uploadNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changed
    • removedInput schema / properties / blobUrl
      Removed value: -{
      -  "description": "After a client upload, the private Blob URL to register.",
      -  "type": "string"
      -}
    • removedInput schema / properties / durationMs
      Removed value: -{
      -  "description": "Duration in milliseconds when registering an uploaded video.",
      -  "maximum": 9007199254740991,
      -  "minimum": -9007199254740991,
      -  "type": "integer"
      -}
    • changedInput schema / properties / fileName / description
      Previous value: -"Original file name when source is upload."New value: +"Upload step 1: the file's name with its extension, such as cover.png."
    • removedInput schema / properties / height
      Removed value: -{
      -  "description": "Pixel height when registering an uploaded image or video.",
      -  "maximum": 9007199254740991,
      -  "minimum": -9007199254740991,
      -  "type": "integer"
      -}
    • changedInput schema / properties / mime / description
      Previous value: -"MIME type when registering an upload."New value: +"Upload step 1, optional: the file's MIME type. Needed when fileName has no extension."
    • addedInput schema / properties / pathname
      Added value: +{
      +  "description": "Upload step 3: the pathname step 1 returned, after the PUT succeeded.",
      +  "type": "string"
      +}
    • removedInput schema / properties / size
      Removed value: -{
      -  "description": "Byte size when registering an upload.",
      -  "maximum": 9007199254740991,
      -  "minimum": -9007199254740991,
      -  "type": "integer"
      -}
    • changedInput schema / properties / source / description
      Previous value: -"url imports a public file; upload returns a one-time client token."New value: +"url imports a public file; upload signs a PUT link (with fileName) or saves the uploaded file (with pathname)."
    • removedInput schema / properties / width
      Removed value: -{
      -  "description": "Pixel width when registering an uploaded image or video.",
      -  "maximum": 9007199254740991,
      -  "minimum": -9007199254740991,
      -  "type": "integer"
      -}
  2. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Beyond annotations, it discloses the multipart upload workflow, the signed URL and required headers, the one-hour upload window, the PDF/LinkedIn limitation, and that Mark never handles user credentials. This is substantial behavioral context for a mutating, open-world tool.

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 front-loaded with the purpose and then cleanly separates URL import, local upload, and private-file handling. The added length is justified by the complexity of the upload flow and no sentence appears wasted.

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?

Given the complexity of the operation, the rich schema, annotations, and output schema, the description covers what the agent needs to call the tool correctly. The important edge case of authenticated files is also addressed.

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 the individual parameter meanings are already documented. The description adds useful cross-parameter workflow semantics, mapping source=url to url, source=upload to fileName in step 1, and pathname in step 3.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: it adds an image, video, or PDF to the asset library. It names related tools but does not explicitly distinguish add_asset from update_asset, so sibling differentiation is slightly incomplete.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives clear usage paths for a public URL and for a local file, including the three-step upload flow and the private-file credential caveat. It does not explicitly state when to use add_asset instead of update_asset or search_assets, so it lacks full alternative guidance.

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