MCP 工具
更新工作區草稿
sosoapi_update_content_draft使用 id、最後讀取的 expected_revision、新 mutation_id 與 content 取代完整且可編輯的共用內容。需要 editor 或更高角色及 operate 權限。共用編輯內容不可信且有長度限制:請保留完整原始輸入或使用 Web 編輯器;請勿回寫 [truncated] 文字。409 衝突會保留已儲存版本:保留本機編輯並核對最新版本,不要覆寫其他編輯者。Save 不會發布,也不能取代已凍結或已提交的草稿。
閱讀 Markdown設定與傳輸方式
設定: core、full · 傳輸方式: stdio、http
選擇 core 或 full 以控制用戶端顯示的工具;這不會變更權限。本機檔案上傳需要 stdio,無法透過 HTTP 使用。設定 SOSOAPI_OUTPUT_SCHEMAS=1 可在探索結果加入輸出結構描述。無論是否啟用此設定,工具皆會回傳結構化結果。
權限與副作用
註解幫助用戶端描述工具。每次呼叫仍會檢查使用者身分驗證、角色、資源存取和能力授權。
{
"readOnlyHint": false,
"destructiveHint": false,
"idempotentHint": true,
"openWorldHint": true
}- /studio-api/content-drafts/update: agent:operate · 持久儲存的工作區編輯內容;沒有發布副作用
輸入欄位
「必填」是指在其父物件及所選分支內必填。必填子欄位不會使選填父物件變成必填。下列規則與欄位名稱均複製自契約。
| 欄位 / 分支 | 類型 / 必填 | 約束 |
|---|---|---|
$ | object在父物件中必填 |
|
id | string在父物件中必填 |
|
expected_revision | integer在父物件中必填 |
|
mutation_id | string在父物件中必填 |
|
content | object在父物件中必填 |
|
content.schemaVersion | number選填/項目 |
|
content.accountIds | array選填/項目 |
|
content.accountIds[] | string選填/項目 |
|
content.caption | string選填/項目 |
|
content.hashtags | string選填/項目 |
|
content.assetIds | array選填/項目 |
|
content.assetIds[] | string選填/項目 |
|
content.threadsTextOnly | boolean選填/項目 | — |
content.instagramMode | string選填/項目 |
|
content.youtubeTitle | string選填/項目 |
|
content.youtubePrivacy | string選填/項目 |
|
content.youtubeSynthetic | boolean選填/項目 | — |
content.youtubeCategoryId | string選填/項目 |
|
content.youtubeShort | boolean選填/項目 | — |
content.linkUrl | string選填/項目 |
|
content.scheduledAt | string選填/項目 |
|
content.displayTimezone | string選填/項目 |
|
content.publishNow | boolean選填/項目 | — |
content.destinationOverrides | object選填/項目 |
|
content.destinationOverrides.* | object選填/項目 |
|
content.destinationOverrides.*.caption | string選填/項目 |
|
content.destinationOverrides.*.scheduledAt | string選填/項目 |
|
content.expiresAt | string選填/項目 |
|
完整 JSON Schema
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"expected_revision": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"mutation_id": {
"type": "string",
"format": "uuid"
},
"content": {
"type": "object",
"properties": {
"schemaVersion": {
"type": "number",
"enum": [
1
]
},
"accountIds": {
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"format": "uuid"
}
},
"caption": {
"type": "string",
"maxLength": 5000
},
"hashtags": {
"type": "string",
"maxLength": 5000
},
"assetIds": {
"maxItems": 20,
"type": "array",
"items": {
"type": "string",
"maxLength": 16,
"pattern": "^[1-9][0-9]*$"
}
},
"threadsTextOnly": {
"type": "boolean"
},
"instagramMode": {
"type": "string",
"enum": [
"IMAGE",
"REELS",
"CAROUSEL",
"STORY_IMAGE",
"STORY_VIDEO"
]
},
"youtubeTitle": {
"type": "string",
"maxLength": 100
},
"youtubePrivacy": {
"type": "string",
"enum": [
"private",
"unlisted",
"public"
]
},
"youtubeSynthetic": {
"type": "boolean"
},
"youtubeCategoryId": {
"type": "string",
"maxLength": 32
},
"youtubeShort": {
"type": "boolean"
},
"linkUrl": {
"type": "string",
"maxLength": 2048
},
"scheduledAt": {
"type": "string",
"maxLength": 64
},
"displayTimezone": {
"type": "string",
"minLength": 1,
"maxLength": 128
},
"publishNow": {
"type": "boolean"
},
"destinationOverrides": {
"type": "object",
"additionalProperties": {
"type": "object",
"properties": {
"caption": {
"type": "string",
"maxLength": 5000
},
"scheduledAt": {
"type": "string",
"maxLength": 64
}
},
"additionalProperties": false
}
},
"expiresAt": {
"type": "string",
"maxLength": 64
}
},
"additionalProperties": false
}
},
"required": [
"id",
"expected_revision",
"mutation_id",
"content"
],
"additionalProperties": false
}結構化輸出
此 schema 描述成功工具結果中的 structuredContent。MCP 回應也包含 content,並可能在呼叫失敗時設定 isError。對於發布,請讀取貼文的最終結果,不要把已接受的請求或文字回應當作確認。連結的 API 操作說明了權限和重試規則。
「必填」是指在其父物件及所選分支內必填。必填子欄位不會使選填父物件變成必填。下列規則與欄位名稱均複製自契約。
| 欄位 / 分支 | 類型 / 必填 | 約束 |
|---|---|---|
$ | object在父物件中必填 |
|
draft | object在父物件中必填 |
|
draft.id | string在父物件中必填 |
|
draft.workspace_id | string在父物件中必填 |
|
draft.revision | integer在父物件中必填 |
|
draft.state | string在父物件中必填 |
|
draft.content | object在父物件中必填 |
|
draft.content.schemaVersion | number在父物件中必填 |
|
draft.content.accountIds | array在父物件中必填 |
|
draft.content.accountIds[] | string選填/項目 |
|
draft.content.caption | string在父物件中必填 |
|
draft.content.hashtags | string在父物件中必填 |
|
draft.content.assetIds | array在父物件中必填 |
|
draft.content.assetIds[] | string選填/項目 |
|
draft.content.threadsTextOnly | boolean在父物件中必填 |
|
draft.content.instagramMode | string在父物件中必填 |
|
draft.content.youtubeTitle | string在父物件中必填 |
|
draft.content.youtubePrivacy | string在父物件中必填 |
|
draft.content.youtubeSynthetic | boolean在父物件中必填 |
|
draft.content.youtubeCategoryId | string在父物件中必填 |
|
draft.content.youtubeShort | boolean在父物件中必填 |
|
draft.content.linkUrl | string在父物件中必填 |
|
draft.content.scheduledAt | string在父物件中必填 |
|
draft.content.displayTimezone | string在父物件中必填 |
|
draft.content.publishNow | boolean在父物件中必填 |
|
draft.content.destinationOverrides | object在父物件中必填 |
|
draft.content.destinationOverrides.* | object選填/項目 |
|
draft.content.destinationOverrides.*.caption | string選填/項目 |
|
draft.content.destinationOverrides.*.scheduledAt | string選填/項目 |
|
draft.content.expiresAt | string在父物件中必填 |
|
draft.created_by | string | null在父物件中必填 | — |
draft.created_byanyOf 1 | string在父物件中必填 |
|
draft.created_byanyOf 2 | null在父物件中必填 | — |
draft.updated_by | string | null在父物件中必填 | — |
draft.updated_byanyOf 1 | string在父物件中必填 |
|
draft.updated_byanyOf 2 | null在父物件中必填 | — |
draft.created_at | string在父物件中必填 |
|
draft.updated_at | string在父物件中必填 |
|
draft.submission | object | null在父物件中必填 | — |
draft.submissionanyOf 1 | object在父物件中必填 |
|
draft.submission.idanyOf 1 | string在父物件中必填 |
|
draft.submission.expected_revisionanyOf 1 | integer在父物件中必填 |
|
draft.submission.started_atanyOf 1 | string在父物件中必填 |
|
draft.submission.receiptanyOf 1 | object | null在父物件中必填 | — |
draft.submission.receiptanyOf 1 / anyOf 1 | object在父物件中必填 |
|
draft.submission.receipt.batch_idanyOf 1 / anyOf 1 | string | null在父物件中必填 | — |
draft.submission.receipt.batch_idanyOf 1 / anyOf 1 / anyOf 1 | string在父物件中必填 |
|
draft.submission.receipt.batch_idanyOf 1 / anyOf 1 / anyOf 2 | null在父物件中必填 | — |
draft.submission.receipt.successesanyOf 1 / anyOf 1 | array在父物件中必填 |
|
draft.submission.receipt.successes[]anyOf 1 / anyOf 1 | object選填/項目 |
|
draft.submission.receipt.successes[].social_account_idanyOf 1 / anyOf 1 | string在父物件中必填 |
|
draft.submission.receipt.successes[].post_idanyOf 1 / anyOf 1 | string在父物件中必填 |
|
draft.submission.receipt.failuresanyOf 1 / anyOf 1 | array在父物件中必填 |
|
draft.submission.receipt.failures[]anyOf 1 / anyOf 1 | object選填/項目 |
|
draft.submission.receipt.failures[].social_account_idanyOf 1 / anyOf 1 | string在父物件中必填 |
|
draft.submission.receipt.failures[].codeanyOf 1 / anyOf 1 | string在父物件中必填 |
|
draft.submission.receipt.failures[].messageanyOf 1 / anyOf 1 | string在父物件中必填 |
|
draft.submission.receiptanyOf 1 / anyOf 2 | null在父物件中必填 | — |
draft.submissionanyOf 2 | null在父物件中必填 | — |
replayed | boolean在父物件中必填 | — |
完整 JSON Schema
{
"type": "object",
"properties": {
"draft": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"workspace_id": {
"type": "string",
"format": "uuid"
},
"revision": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"state": {
"type": "string",
"enum": [
"draft",
"submitting",
"submitted"
]
},
"content": {
"type": "object",
"properties": {
"schemaVersion": {
"default": 1,
"type": "number",
"const": 1
},
"accountIds": {
"default": [],
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"format": "uuid"
}
},
"caption": {
"default": "",
"type": "string",
"maxLength": 5000
},
"hashtags": {
"default": "",
"type": "string",
"maxLength": 5000
},
"assetIds": {
"default": [],
"maxItems": 20,
"type": "array",
"items": {
"type": "string",
"maxLength": 16,
"pattern": "^[1-9][0-9]*$"
}
},
"threadsTextOnly": {
"default": false,
"type": "boolean"
},
"instagramMode": {
"default": "REELS",
"type": "string",
"enum": [
"IMAGE",
"REELS",
"CAROUSEL",
"STORY_IMAGE",
"STORY_VIDEO"
]
},
"youtubeTitle": {
"default": "",
"type": "string",
"maxLength": 100
},
"youtubePrivacy": {
"default": "private",
"type": "string",
"enum": [
"private",
"unlisted",
"public"
]
},
"youtubeSynthetic": {
"default": false,
"type": "boolean"
},
"youtubeCategoryId": {
"default": "",
"type": "string",
"maxLength": 32
},
"youtubeShort": {
"default": false,
"type": "boolean"
},
"linkUrl": {
"default": "",
"type": "string",
"maxLength": 2048
},
"scheduledAt": {
"default": "",
"type": "string",
"maxLength": 64
},
"displayTimezone": {
"default": "UTC",
"type": "string",
"minLength": 1,
"maxLength": 128
},
"publishNow": {
"default": false,
"type": "boolean"
},
"destinationOverrides": {
"default": {},
"type": "object",
"propertyNames": {
"type": "string",
"format": "uuid"
},
"additionalProperties": {
"type": "object",
"properties": {
"caption": {
"type": "string",
"maxLength": 5000
},
"scheduledAt": {
"type": "string",
"maxLength": 64
}
},
"additionalProperties": false
}
},
"expiresAt": {
"default": "",
"type": "string",
"maxLength": 64
}
},
"required": [
"schemaVersion",
"accountIds",
"caption",
"hashtags",
"assetIds",
"threadsTextOnly",
"instagramMode",
"youtubeTitle",
"youtubePrivacy",
"youtubeSynthetic",
"youtubeCategoryId",
"youtubeShort",
"linkUrl",
"scheduledAt",
"displayTimezone",
"publishNow",
"destinationOverrides",
"expiresAt"
],
"additionalProperties": false
},
"created_by": {
"anyOf": [
{
"type": "string",
"format": "uuid"
},
{
"type": "null"
}
]
},
"updated_by": {
"anyOf": [
{
"type": "string",
"format": "uuid"
},
{
"type": "null"
}
]
},
"created_at": {
"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"updated_at": {
"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"submission": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"expected_revision": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"started_at": {
"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"receipt": {
"anyOf": [
{
"type": "object",
"properties": {
"batch_id": {
"anyOf": [
{
"type": "string",
"format": "uuid"
},
{
"type": "null"
}
]
},
"successes": {
"maxItems": 50,
"type": "array",
"items": {
"type": "object",
"properties": {
"social_account_id": {
"type": "string",
"format": "uuid"
},
"post_id": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
}
},
"required": [
"social_account_id",
"post_id"
],
"additionalProperties": false
}
},
"failures": {
"maxItems": 50,
"type": "array",
"items": {
"type": "object",
"properties": {
"social_account_id": {
"type": "string",
"format": "uuid"
},
"code": {
"type": "string",
"minLength": 1,
"maxLength": 160
},
"message": {
"type": "string",
"maxLength": 2000
}
},
"required": [
"social_account_id",
"code",
"message"
],
"additionalProperties": false
}
}
},
"required": [
"batch_id",
"successes",
"failures"
],
"additionalProperties": false
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"expected_revision",
"started_at",
"receipt"
],
"additionalProperties": false
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"workspace_id",
"revision",
"state",
"content",
"created_by",
"updated_by",
"created_at",
"updated_at",
"submission"
],
"additionalProperties": false
},
"replayed": {
"type": "boolean"
}
},
"required": [
"draft",
"replayed"
],
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false
}工具呼叫範例
這些範例使用已依結構描述檢查的虛構值。請將 ID 替換為您有權使用的 ID、將媒體替換為已就緒素材,並將日期替換為已確認的發布時間。提交寫入前,請檢查帳號資格。本頁不會傳送 API 請求。
{
"name": "sosoapi_update_content_draft",
"arguments": {
"id": "44444444-4444-4444-8444-444444444444",
"expected_revision": 1,
"mutation_id": "66666666-6666-4666-8666-666666666666",
"content": {
"schemaVersion": 1,
"accountIds": [],
"caption": "Revised editorial content, still not scheduled.",
"hashtags": "",
"assetIds": [],
"threadsTextOnly": false,
"instagramMode": "REELS",
"youtubeTitle": "",
"youtubePrivacy": "private",
"youtubeSynthetic": false,
"youtubeCategoryId": "",
"youtubeShort": false,
"linkUrl": "",
"scheduledAt": "",
"displayTimezone": "UTC",
"publishNow": false,
"destinationOverrides": {},
"expiresAt": ""
}
}
}structuredContent
{
"draft": {
"id": "44444444-4444-4444-8444-444444444444",
"workspace_id": "11111111-1111-4111-8111-111111111111",
"revision": 2,
"state": "draft",
"content": {
"schemaVersion": 1,
"accountIds": [],
"caption": "Revised editorial content, still not scheduled.",
"hashtags": "",
"assetIds": [],
"threadsTextOnly": false,
"instagramMode": "REELS",
"youtubeTitle": "",
"youtubePrivacy": "private",
"youtubeSynthetic": false,
"youtubeCategoryId": "",
"youtubeShort": false,
"linkUrl": "",
"scheduledAt": "",
"displayTimezone": "UTC",
"publishNow": false,
"destinationOverrides": {},
"expiresAt": ""
},
"created_by": null,
"updated_by": null,
"created_at": "2099-01-15T08:00:00Z",
"updated_at": "2099-01-15T08:30:00Z",
"submission": null
},
"replayed": false
}