upload_asset
Add an image or video to the user's SocialClaw media library so it can be attached to a post. Pass exactly one of: file (a file the user attached in this chat), sourceUrl (a direct public http(s) link to the image or video file, not a web page), or contentBase64 (small files only). Files up to 1 GB are supported through file or sourceUrl. The result is the asset: when status is ready, use its publicUrl as media_link in validate_schedule/apply_schedule. Large videos may come back with status uploading; then call get_asset with the asset id until status is ready (or failed) before scheduling.
Calling it
Invoke this tool with a JSON-RPC 2.0 tools/call request against the hosted MCP endpoint at POST https://getsocialclaw.com/mcp. Send your workspace API key as Authorization: Bearer sc_live_your_key. In an MCP client (Claude, Cursor, Claude Code) the client makes this call for you — just ask it to use upload_asset.
Arguments
| Parameter | Type | Description | |
|---|---|---|---|
file |
object |
optional | A file the user attached in the conversation. |
sourceUrl |
string |
optional | Direct public http(s) URL of the image or video file. |
filename |
string |
optional | Optional filename including extension, e.g. launch.png. Inferred from the file or URL when omitted. |
contentBase64 |
string |
optional | Base64-encoded file content. Small files only; prefer file or sourceUrl. |
Example request
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "upload_asset",
"arguments": {
"file": "...",
"sourceUrl": "https://example.com/launch.png"
}
}
}
Response
The server replies with a JSON-RPC result whose content array carries the tool output as a JSON-encoded text block. isError is true when the call failed.
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"content": [
{
"type": "text",
"text": "{ /* JSON-encoded tool result */ }"
}
],
"isError": false
}
}