MCP tool
請求平台洞察數據
sosoapi_request_provider_insights向平台請求帳戶或單篇帖文洞察,可選最多 366 日日期範圍。回傳 request_id,有 cache 時附結果,否則用 sosoapi_get_provider_insight_status 跟進。
閱讀 MarkdownProfiles 及連接方式
Profiles: core, full · Transports: stdio, http
Profile 只影響工具可見性,唔會授權。HTTP 冇本機檔案上傳。SOSOAPI_OUTPUT_SCHEMAS=1 會宣告輸出 schema;兩種模式都會回傳 structured results。
權限及改動
MCP annotations 只係發現提示,唔係存取控制保證;仍然有實際登入、角色、資源及能力檢查。
{
"readOnlyHint": false,
"destructiveHint": false,
"idempotentHint": false,
"openWorldHint": true
}- /analytics-api/provider-insights/request: agent:operate · provider-native result or explicit unavailable reason
輸入欄位
必填表示喺所屬物件及所選分支內必須提供;子欄位必填唔代表可選父物件變成必填。以下欄位名稱及規則直接來自 contract。
| 欄位/分支 | 類型/必填 | 限制 |
|---|---|---|
$ | object父物件內必填 |
|
workspace_id | string父物件內必填 |
|
social_account_id | string父物件內必填 |
|
resource_kind | string父物件內必填 |
|
provider_resource_id | string可選/陣列項目 |
|
start_date | string可選/陣列項目 |
|
end_date | string可選/陣列項目 |
|
include_audience | boolean可選/陣列項目 | — |
refresh | boolean可選/陣列項目 | — |
完整 JSON Schema
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"format": "uuid"
},
"social_account_id": {
"type": "string",
"format": "uuid"
},
"resource_kind": {
"type": "string",
"enum": [
"account",
"post"
]
},
"provider_resource_id": {
"type": "string",
"minLength": 1,
"maxLength": 512
},
"start_date": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"end_date": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"include_audience": {
"type": "boolean"
},
"refresh": {
"type": "boolean"
}
},
"required": [
"workspace_id",
"social_account_id",
"resource_kind"
],
"additionalProperties": false
}結構化輸出
此 schema 描述成功工具結果嘅 structuredContent。MCP envelope 亦包括 content,失敗可能設定 isError;唔好將文字收據或接受請求當成平台終態。權限及重試規則見對應 API 操作。
必填表示喺所屬物件及所選分支內必須提供;子欄位必填唔代表可選父物件變成必填。以下欄位名稱及規則直接來自 contract。
| 欄位/分支 | 類型/必填 | 限制 |
|---|---|---|
$ | object父物件內必填 |
|
contract_version | string父物件內必填 |
|
request_id | string父物件內必填 |
|
status | string父物件內必填 |
|
cache_status | string父物件內必填 |
|
poll_after_ms | integer父物件內必填 |
|
result | object可選/陣列項目 |
|
result.contract_version | string父物件內必填 |
|
result.request_id | string父物件內必填 |
|
result.platform | string父物件內必填 |
|
result.resource | object父物件內必填 |
|
result.resource.kind | string父物件內必填 |
|
result.resource.social_account_id | string父物件內必填 |
|
result.resource.provider_resource_id | string | null父物件內必填 | — |
result.resource.provider_resource_idanyOf 1 | string父物件內必填 | — |
result.resource.provider_resource_idanyOf 2 | null父物件內必填 | — |
result.provider_api_version | string父物件內必填 |
|
result.fetched_at | string父物件內必填 |
|
result.status | string父物件內必填 |
|
result.availability | array父物件內必填 |
|
result.availability[] | object可選/陣列項目 |
|
result.availability[].scope | string父物件內必填 |
|
result.availability[].status | string父物件內必填 |
|
result.availability[].reason | string可選/陣列項目 |
|
result.provider_data | any JSON value | null父物件內必填 | — |
result.provider_dataanyOf 1 | any JSON value父物件內必填 | — |
result.provider_dataanyOf 2 | null父物件內必填 | — |
result.requested_date_range | object | null父物件內必填 | — |
result.requested_date_rangeanyOf 1 | object父物件內必填 |
|
result.requested_date_range.start_dateanyOf 1 | string父物件內必填 |
|
result.requested_date_range.end_dateanyOf 1 | string父物件內必填 |
|
result.requested_date_rangeanyOf 2 | null父物件內必填 | — |
result.cache | object父物件內必填 |
|
result.cache.authoritative | boolean父物件內必填 |
|
result.cache.status | string父物件內必填 |
|
result.cache.expires_at | string父物件內必填 |
|
完整 JSON Schema
{
"type": "object",
"properties": {
"contract_version": {
"type": "string",
"const": "provider-insights/v1"
},
"request_id": {
"type": "string",
"format": "uuid"
},
"status": {
"type": "string",
"enum": [
"queued",
"completed"
]
},
"cache_status": {
"type": "string",
"enum": [
"hit",
"miss",
"bypassed"
]
},
"poll_after_ms": {
"type": "integer",
"minimum": 0,
"maximum": 60000
},
"result": {
"type": "object",
"properties": {
"contract_version": {
"type": "string",
"const": "provider-insights/v1"
},
"request_id": {
"type": "string",
"format": "uuid"
},
"platform": {
"type": "string",
"enum": [
"facebook",
"instagram",
"threads",
"youtube"
]
},
"resource": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"account",
"post"
]
},
"social_account_id": {
"type": "string",
"format": "uuid"
},
"provider_resource_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"kind",
"social_account_id",
"provider_resource_id"
],
"additionalProperties": false
},
"provider_api_version": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"fetched_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)))$"
},
"status": {
"type": "string",
"enum": [
"available",
"partial",
"unavailable"
]
},
"availability": {
"minItems": 1,
"maxItems": 64,
"type": "array",
"items": {
"type": "object",
"properties": {
"scope": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"status": {
"type": "string",
"enum": [
"available",
"partial",
"not_returned",
"unsupported",
"permission_required",
"threshold_not_met",
"no_data",
"failed"
]
},
"reason": {
"type": "string",
"minLength": 1,
"maxLength": 2000
}
},
"required": [
"scope",
"status"
],
"additionalProperties": false
}
},
"provider_data": {
"anyOf": [
{},
{
"type": "null"
}
]
},
"requested_date_range": {
"anyOf": [
{
"type": "object",
"properties": {
"start_date": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"end_date": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
}
},
"required": [
"start_date",
"end_date"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"cache": {
"type": "object",
"properties": {
"authoritative": {
"type": "boolean",
"const": false
},
"status": {
"type": "string",
"enum": [
"stored",
"hit",
"bypassed"
]
},
"expires_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)))$"
}
},
"required": [
"authoritative",
"status",
"expires_at"
],
"additionalProperties": false
}
},
"required": [
"contract_version",
"request_id",
"platform",
"resource",
"provider_api_version",
"fetched_at",
"status",
"availability",
"provider_data",
"requested_date_range",
"cache"
],
"additionalProperties": false
}
},
"required": [
"contract_version",
"request_id",
"status",
"cache_status",
"poll_after_ms"
],
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false
}工具呼叫範例
以下虛構值已按 contract 驗證,唔係真實帳戶 ID、憑證或發佈紀錄。請用已授權範圍回傳嘅 ID、已準備好嘅素材及已審核排程取代,寫入前核對平台資格。此頁唔會呼叫 API。
{
"name": "sosoapi_request_provider_insights",
"arguments": {
"workspace_id": "11111111-1111-4111-8111-111111111111",
"social_account_id": "11111111-1111-4111-8111-111111111111",
"resource_kind": "account"
}
}structuredContent
{
"contract_version": "provider-insights/v1",
"request_id": "11111111-1111-4111-8111-111111111111",
"status": "queued",
"cache_status": "hit",
"poll_after_ms": 0
}