MCP 工具
取得素材匯入狀態
sosoapi_get_asset_import_status透過 import_id 讀取匯入。發布貼文時傳入 include_asset=true:ready 結果包含已登記素材 id、kind 和穩定的 asset_url,無需另行呼叫 get_asset。待處理或缺失的素材不可排程。絕不使用來源或預覽 URL 作為媒體識別。如停滯,使用 job_id 讀取 sosoapi_job_status;絕不啟動重複匯入。
閱讀 Markdown設定與傳輸方式
設定: core、full · 傳輸方式: stdio、http
選擇 core 或 full 以控制用戶端顯示的工具;這不會變更權限。本機檔案上傳需要 stdio,無法透過 HTTP 使用。設定 SOSOAPI_OUTPUT_SCHEMAS=1 可在探索結果加入輸出結構描述。無論是否啟用此設定,工具皆會回傳結構化結果。
權限與副作用
註解幫助用戶端描述工具。每次呼叫仍會檢查使用者身分驗證、角色、資源存取和能力授權。
{
"readOnlyHint": true,
"destructiveHint": false,
"idempotentHint": true,
"openWorldHint": false
}- /assets-api/imports/status:agent:operate · synchronous_http_response
輸入欄位
「必填」是指在其父物件及所選分支內必填。必填子欄位不會使選填父物件變成必填。下列規則與欄位名稱均複製自契約。
| 欄位 / 分支 | 類型 / 必填 | 約束 |
|---|---|---|
$ | object在父物件中必填 |
|
workspace_id | string在父物件中必填 |
|
import_id | string在父物件中必填 |
|
include_asset | boolean選填/項目 | — |
完整 JSON Schema
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"format": "uuid"
},
"import_id": {
"type": "string",
"format": "uuid"
},
"include_asset": {
"type": "boolean"
}
},
"required": [
"workspace_id",
"import_id"
],
"additionalProperties": false
}結構化輸出
此 schema 描述成功工具結果中的 structuredContent。MCP 回應也包含 content,並可能在呼叫失敗時設定 isError。對於發布,請讀取貼文的最終結果,不要把已接受的請求或文字回應當作確認。連結的 API 操作說明了權限和重試規則。
「必填」是指在其父物件及所選分支內必填。必填子欄位不會使選填父物件變成必填。下列規則與欄位名稱均複製自契約。
| 欄位 / 分支 | 類型 / 必填 | 約束 |
|---|---|---|
$ | object在父物件中必填 |
|
import | object在父物件中必填 |
|
import.id | string在父物件中必填 |
|
import.status | string在父物件中必填 |
|
import.job_id | string | null在父物件中必填 | — |
import.job_idanyOf 1 | string在父物件中必填 |
|
import.job_idanyOf 2 | null在父物件中必填 | — |
import.asset_id | integer | null在父物件中必填 | — |
import.asset_idanyOf 1 | integer在父物件中必填 |
|
import.asset_idanyOf 2 | null在父物件中必填 | — |
import.completed_asset_id | integer | null在父物件中必填 | — |
import.completed_asset_idanyOf 1 | integer在父物件中必填 |
|
import.completed_asset_idanyOf 2 | null在父物件中必填 | — |
import.asset_purged_at | string | null在父物件中必填 | — |
import.asset_purged_atanyOf 1 | string在父物件中必填 | — |
import.asset_purged_atanyOf 2 | null在父物件中必填 | — |
import.source_url | string在父物件中必填 |
|
import.final_url | string | null在父物件中必填 | — |
import.final_urlanyOf 1 | string在父物件中必填 |
|
import.final_urlanyOf 2 | null在父物件中必填 | — |
import.object_key | string | null在父物件中必填 | — |
import.object_keyanyOf 1 | string在父物件中必填 |
|
import.object_keyanyOf 2 | null在父物件中必填 | — |
import.content_type | string | null在父物件中必填 | — |
import.content_typeanyOf 1 | string在父物件中必填 |
|
import.content_typeanyOf 2 | null在父物件中必填 | — |
import.byte_size | integer | null在父物件中必填 | — |
import.byte_sizeanyOf 1 | integer在父物件中必填 |
|
import.byte_sizeanyOf 2 | null在父物件中必填 | — |
import.content_sha256 | string | null在父物件中必填 | — |
import.content_sha256anyOf 1 | string在父物件中必填 |
|
import.content_sha256anyOf 2 | null在父物件中必填 | — |
import.media_probe | reference | null在父物件中必填 | — |
import.media_probeanyOf 1 | string | number | boolean | null | array | object在父物件中必填 | — |
import.media_probeanyOf 1 / anyOf 1 | string在父物件中必填 | — |
import.media_probeanyOf 1 / anyOf 2 | number在父物件中必填 | — |
import.media_probeanyOf 1 / anyOf 3 | boolean在父物件中必填 | — |
import.media_probeanyOf 1 / anyOf 4 | null在父物件中必填 | — |
import.media_probeanyOf 1 / anyOf 5 | array在父物件中必填 | — |
import.media_probe[]anyOf 1 / anyOf 5 | reference選填/項目 |
|
import.media_probeanyOf 1 / anyOf 6 | object在父物件中必填 |
|
import.media_probe.*anyOf 1 / anyOf 6 | reference選填/項目 |
|
import.media_probeanyOf 2 | null在父物件中必填 | — |
import.error_message | string | null在父物件中必填 | — |
import.error_messageanyOf 1 | string在父物件中必填 | — |
import.error_messageanyOf 2 | null在父物件中必填 | — |
import.created_at | string在父物件中必填 | — |
import.completed_at | string | null在父物件中必填 | — |
import.completed_atanyOf 1 | string在父物件中必填 | — |
import.completed_atanyOf 2 | null在父物件中必填 | — |
asset | object | null選填/項目 | — |
assetanyOf 1 | object選填/項目 |
|
asset.idanyOf 1 | integer | string在父物件中必填 | — |
asset.idanyOf 1 / anyOf 1 | integer在父物件中必填 |
|
asset.idanyOf 1 / anyOf 2 | string在父物件中必填 | — |
asset.asset_typeanyOf 1 | string在父物件中必填 |
|
asset.asset_urlanyOf 1 | string | null在父物件中必填 | — |
asset.asset_urlanyOf 1 / anyOf 1 | string在父物件中必填 | — |
asset.asset_urlanyOf 1 / anyOf 2 | null在父物件中必填 | — |
assetanyOf 2 | null選填/項目 | — |
完整 JSON Schema
{
"type": "object",
"properties": {
"import": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"status": {
"type": "string",
"enum": [
"queued",
"importing",
"needs_repair",
"ready",
"asset_purged",
"failed"
]
},
"job_id": {
"anyOf": [
{
"type": "string",
"format": "uuid"
},
{
"type": "null"
}
]
},
"asset_id": {
"anyOf": [
{
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"completed_asset_id": {
"anyOf": [
{
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"asset_purged_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"source_url": {
"type": "string",
"format": "uri"
},
"final_url": {
"anyOf": [
{
"type": "string",
"format": "uri"
},
{
"type": "null"
}
]
},
"object_key": {
"anyOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "null"
}
]
},
"content_type": {
"anyOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "null"
}
]
},
"byte_size": {
"anyOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"content_sha256": {
"anyOf": [
{
"type": "string",
"pattern": "^[0-9a-f]{64}$"
},
{
"type": "null"
}
]
},
"media_probe": {
"anyOf": [
{
"$ref": "#/definitions/__schema0"
},
{
"type": "null"
}
]
},
"error_message": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string"
},
"completed_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"status",
"job_id",
"asset_id",
"completed_asset_id",
"asset_purged_at",
"source_url",
"final_url",
"object_key",
"content_type",
"byte_size",
"content_sha256",
"media_probe",
"error_message",
"created_at",
"completed_at"
],
"additionalProperties": false
},
"asset": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "string"
}
]
},
"asset_type": {
"type": "string",
"enum": [
"text",
"image",
"video",
"audio"
]
},
"asset_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"asset_type",
"asset_url"
],
"additionalProperties": false
},
{
"type": "null"
}
]
}
},
"required": [
"import"
],
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"definitions": {
"__schema0": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
},
{
"type": "array",
"items": {
"$ref": "#/definitions/__schema0"
}
},
{
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"$ref": "#/definitions/__schema0"
}
}
]
}
}
}工具呼叫範例
這些範例使用已依結構描述檢查的虛構值。請將 ID 替換為您有權使用的 ID、將媒體替換為已就緒素材,並將日期替換為已確認的發布時間。提交寫入前,請檢查帳號資格。本頁不會傳送 API 請求。
{
"name": "sosoapi_get_asset_import_status",
"arguments": {
"workspace_id": "11111111-1111-4111-8111-111111111111",
"import_id": "11111111-1111-4111-8111-111111111111"
}
}structuredContent
{
"import": {
"id": "11111111-1111-4111-8111-111111111111",
"status": "queued",
"job_id": null,
"asset_id": null,
"completed_asset_id": null,
"asset_purged_at": null,
"source_url": "https://example.com/media.png",
"final_url": null,
"object_key": null,
"content_type": null,
"byte_size": null,
"content_sha256": null,
"media_probe": null,
"error_message": null,
"created_at": "example",
"completed_at": null
}
}