MCP tool
Upload a local image or video
sosoapi_upload_assetUpload a local image or video file into a Workspace asset library and register it as an asset. Only real PNG/JPEG/GIF/WebP/MP4/MOV/WebM/MKV/MPEG files up to 500 MiB from the working directory, temp folder, Pictures/Movies/Videos or SOSOAPI_UPLOAD_ROOTS are accepted; dot-files and dot-folders are refused. Returns the asset id and URL for Scheduled Post media.
Read as MarkdownProfiles and transports
Profiles: core, full · Transports: stdio
Choose core or full to control which tools your client sees; this does not change its permissions. Local file upload requires stdio and is unavailable over HTTP. Set SOSOAPI_OUTPUT_SCHEMAS=1 to include output schemas in discovery. Tools return structured results with or without that setting.
Permissions and side effects
Annotations help clients describe a tool. Each call still checks the user’s authentication, role, resource access and capability grants.
{
"readOnlyHint": false,
"destructiveHint": false,
"idempotentHint": true,
"openWorldHint": true
}- /assets-api/upload/sign: agent:operate · synchronous_http_response
- /assets-api/upload/complete: agent:operate · synchronous_http_response
Input fields
Required means required inside its parent object and selected branch. A required child does not make an optional parent required. Rules and field names below are copied from the contract.
| Field / branch | Type / required | Constraints |
|---|---|---|
$ | objectRequired in parent | — |
workspace_id | stringRequired in parent |
|
file_path | stringRequired in parent |
|
idempotency_key | stringRequired in parent |
|
content_type | stringOptional / item |
|
title | stringOptional / item |
|
description | stringOptional / item |
|
tags | arrayOptional / item |
|
tags[] | stringOptional / item |
|
metadata | objectOptional / item |
|
metadata.* | any JSON valueOptional / item | — |
Complete JSON Schema
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"format": "uuid"
},
"file_path": {
"type": "string",
"minLength": 1
},
"idempotency_key": {
"type": "string",
"minLength": 8,
"maxLength": 160
},
"content_type": {
"type": "string",
"minLength": 1
},
"title": {
"type": "string",
"maxLength": 200
},
"description": {
"type": "string",
"maxLength": 2000
},
"tags": {
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"maxLength": 64
}
},
"metadata": {
"type": "object",
"additionalProperties": {}
}
},
"required": [
"workspace_id",
"file_path",
"idempotency_key"
]
}Structured output
This schema describes structuredContent in a successful tool result. The MCP response also includes content and may set isError when a call fails. For publishing, read the post’s final result rather than treating an accepted request or text response as confirmation. The linked API operation explains permissions and retry rules.
Required means required inside its parent object and selected branch. A required child does not make an optional parent required. Rules and field names below are copied from the contract.
| Field / branch | Type / required | Constraints |
|---|---|---|
$ | objectRequired in parent |
|
asset | objectRequired in parent |
|
asset.id | integer | stringRequired in parent | — |
asset.idanyOf 1 | integerRequired in parent |
|
asset.idanyOf 2 | stringRequired in parent | — |
asset.workspace_id | stringRequired in parent |
|
asset.user_id | stringRequired in parent |
|
asset.asset_type | stringRequired in parent |
|
asset.asset_url | string | nullRequired in parent | — |
asset.asset_urlanyOf 1 | stringRequired in parent | — |
asset.asset_urlanyOf 2 | nullRequired in parent | — |
asset.preview_url | string | nullOptional / item | Workspace-authorized temporary read URL. Refresh through Asset read/list after preview_expires_at; keep asset_url as persisted media identity. — |
asset.preview_urlanyOf 1 | stringOptional / item |
|
asset.preview_urlanyOf 2 | nullOptional / item | — |
asset.preview_expires_at | string | nullOptional / item | — |
asset.preview_expires_atanyOf 1 | stringOptional / item |
|
asset.preview_expires_atanyOf 2 | nullOptional / item | — |
asset.title | string | nullRequired in parent | — |
asset.titleanyOf 1 | stringRequired in parent | — |
asset.titleanyOf 2 | nullRequired in parent | — |
asset.description | string | nullRequired in parent | — |
asset.descriptionanyOf 1 | stringRequired in parent | — |
asset.descriptionanyOf 2 | nullRequired in parent | — |
asset.tags | array | nullRequired in parent | — |
asset.tagsanyOf 1 | arrayRequired in parent | — |
asset.tags[]anyOf 1 | stringOptional / item | — |
asset.tagsanyOf 2 | nullRequired in parent | — |
asset.metadata | object | nullRequired in parent | — |
asset.metadataanyOf 1 | objectRequired in parent |
|
asset.metadata.*anyOf 1 | any JSON valueOptional / item | — |
asset.metadataanyOf 2 | nullRequired in parent | — |
asset.source | string | nullOptional / item | — |
asset.sourceanyOf 1 | stringOptional / item | — |
asset.sourceanyOf 2 | nullOptional / item | — |
asset.source_metadata | object | nullOptional / item | — |
asset.source_metadataanyOf 1 | objectOptional / item |
|
asset.source_metadata.*anyOf 1 | any JSON valueOptional / item | — |
asset.source_metadataanyOf 2 | nullOptional / item | — |
asset.created_at | stringRequired in parent | — |
asset.version | integerOptional / item |
|
deduped | booleanRequired in parent | — |
Complete JSON Schema
{
"type": "object",
"properties": {
"asset": {
"type": "object",
"properties": {
"id": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "string"
}
]
},
"workspace_id": {
"type": "string",
"format": "uuid"
},
"user_id": {
"type": "string",
"format": "uuid"
},
"asset_type": {
"type": "string",
"enum": [
"text",
"image",
"video",
"audio"
]
},
"asset_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"preview_url": {
"description": "Workspace-authorized temporary read URL. Refresh through Asset read/list after preview_expires_at; keep asset_url as persisted media identity.",
"anyOf": [
{
"type": "string",
"format": "uri"
},
{
"type": "null"
}
]
},
"preview_expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
},
{
"type": "null"
}
]
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"tags": {
"anyOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "null"
}
]
},
"metadata": {
"anyOf": [
{
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
{
"type": "null"
}
]
},
"source": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"source_metadata": {
"anyOf": [
{
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string"
},
"version": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"id",
"workspace_id",
"user_id",
"asset_type",
"asset_url",
"title",
"description",
"tags",
"metadata",
"created_at"
],
"additionalProperties": false
},
"deduped": {
"type": "boolean"
}
},
"required": [
"asset",
"deduped"
],
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false
}Example tool call
These examples use fictional values checked against the schemas. Replace the IDs with ones you are authorized to use, the media with ready assets and the dates with your confirmed publishing time. Check the account’s eligibility before submitting a write. This page sends no API requests.
{
"name": "sosoapi_upload_asset",
"arguments": {
"workspace_id": "11111111-1111-4111-8111-111111111111",
"file_path": "./example.png",
"idempotency_key": "example-upload-001"
}
}structuredContent
{
"asset": {
"id": 0,
"workspace_id": "11111111-1111-4111-8111-111111111111",
"user_id": "11111111-1111-4111-8111-111111111111",
"asset_type": "text",
"asset_url": null,
"title": null,
"description": null,
"tags": null,
"metadata": null,
"created_at": "example"
},
"deduped": false
}