Add Asset
add_assetAdds 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
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Public https URL when source is url. | |
| mime | No | Upload step 1, optional: the file's MIME type. Needed when fileName has no extension. | |
| name | No | Optional display name. | |
| source | Yes | url imports a public file; upload signs a PUT link (with fileName) or saves the uploaded file (with pathname). | |
| fileName | No | Upload step 1: the file's name with its extension, such as cover.png. | |
| pathname | No | Upload step 3: the pathname step 1 returned, after the PUT succeeded. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| asset | No | ||
| upload | No |