MCP tool
讀取私人報表範本版本
sosoapi_get_report_template以 viewer 或以上角色,按 workspace_id、id 同確切 version 讀取私人報表範本。回傳來源檔案、sourceSha256 同欄位配對,並核對儲存來源完整性;唔會修改範本、產生報表或自動更新平台數據。
閱讀 MarkdownProfiles 及連接方式
Profiles: full · Transports: stdio, http
Profile 只影響工具可見性,不會授予權限。HTTP 不提供本機檔案上傳。SOSOAPI_OUTPUT_SCHEMAS=1 會宣告輸出 schema;兩種模式均會回傳 structured results。
權限及改動
MCP annotations 只提供工具發現提示,並非存取控制保證;實際呼叫仍須通過登入、角色、資源及能力檢查。
{
"readOnlyHint": true,
"destructiveHint": false,
"idempotentHint": true,
"openWorldHint": false
}- /analytics-api/reporting/templates/get: agent:operate · synchronous_http_response
輸入欄位
必填表示在所屬物件及所選分支內必須提供;子欄位必填不代表可選的父物件亦變成必填。以下欄位名稱及規則直接來自 contract。
| 欄位/分支 | 類型/必填 | 限制 |
|---|---|---|
$ | object父物件內必填 |
|
workspace_id | string父物件內必填 |
|
id | string父物件內必填 |
|
version | integer父物件內必填 |
|
完整 JSON Schema
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"format": "uuid"
},
"id": {
"type": "string",
"format": "uuid"
},
"version": {
"type": "integer",
"minimum": 1,
"maximum": 1000000
}
},
"required": [
"workspace_id",
"id",
"version"
],
"additionalProperties": false
}結構化輸出
此 schema 描述成功工具結果的 structuredContent。MCP envelope 亦包括 content,失敗時可能設定 isError;請勿將文字收據或已接受的請求視為平台終態。權限及重試規則請參閱對應的 API 操作。
必填表示在所屬物件及所選分支內必須提供;子欄位必填不代表可選的父物件亦變成必填。以下欄位名稱及規則直接來自 contract。
| 欄位/分支 | 類型/必填 | 限制 |
|---|---|---|
$ | object父物件內必填 |
|
contractVersion | string父物件內必填 |
|
workspaceId | string父物件內必填 |
|
id | string父物件內必填 |
|
version | integer父物件內必填 |
|
name | string父物件內必填 |
|
format | string父物件內必填 |
|
sourceBase64 | string父物件內必填 |
|
sourceSha256 | string父物件內必填 |
|
mappings | object父物件內必填 |
|
mappings.* | object可選/陣列項目 | — |
mappings.*oneOf 1 | object可選/陣列項目 |
|
mappings.*.kindoneOf 1 | string父物件內必填 |
|
mappings.*.valueoneOf 1 | string父物件內必填 |
|
mappings.*oneOf 2 | object可選/陣列項目 |
|
mappings.*.kindoneOf 2 | string父物件內必填 |
|
mappings.*.fieldoneOf 2 | string父物件內必填 |
|
mappings.*oneOf 3 | object可選/陣列項目 |
|
mappings.*.kindoneOf 3 | string父物件內必填 |
|
mappings.*.platformoneOf 3 | string父物件內必填 |
|
mappings.*.keyoneOf 3 | string父物件內必填 |
|
mappings.*.unitoneOf 3 | string父物件內必填 |
|
mappings.*.grainoneOf 3 | string父物件內必填 |
|
mappings.*.measurementKindoneOf 3 | string父物件內必填 |
|
mappings.*.accountIdoneOf 3 | string可選/陣列項目 |
|
mappings.*.providerResourceIdoneOf 3 | string | null可選/陣列項目 | — |
mappings.*.providerResourceIdoneOf 3 / anyOf 1 | string可選/陣列項目 |
|
mappings.*.providerResourceIdoneOf 3 / anyOf 2 | null可選/陣列項目 | — |
mappings.*.sourcePathoneOf 3 | string可選/陣列項目 |
|
mappings.*.requestIdoneOf 3 | string | null可選/陣列項目 | — |
mappings.*.requestIdoneOf 3 / anyOf 1 | string可選/陣列項目 |
|
mappings.*.requestIdoneOf 3 / anyOf 2 | null可選/陣列項目 | — |
mappings.*oneOf 4 | object可選/陣列項目 |
|
mappings.*.kindoneOf 4 | string父物件內必填 |
|
mappings.*.idoneOf 4 | string父物件內必填 |
|
mappings.*.versiononeOf 4 | integer父物件內必填 |
|
mappings.*oneOf 5 | object可選/陣列項目 |
|
mappings.*.kindoneOf 5 | string父物件內必填 |
|
mappings.*.sourceoneOf 5 | string父物件內必填 |
|
mappings.*.limitoneOf 5 | integer父物件內必填 |
|
mappings.*oneOf 6 | object可選/陣列項目 |
|
mappings.*.kindoneOf 6 | string父物件內必填 |
|
mappings.*.sourceoneOf 6 | string父物件內必填 |
|
createdAt | string父物件內必填 |
|
完整 JSON Schema
{
"type": "object",
"properties": {
"contractVersion": {
"type": "string",
"const": "analytics-template/v1"
},
"workspaceId": {
"type": "string",
"format": "uuid"
},
"id": {
"type": "string",
"format": "uuid"
},
"version": {
"type": "integer",
"minimum": 1,
"maximum": 1000000
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"format": {
"type": "string",
"enum": [
"pptx",
"docx",
"xlsx"
]
},
"sourceBase64": {
"type": "string",
"maxLength": 12582912,
"pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$"
},
"sourceSha256": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"mappings": {
"type": "object",
"propertyNames": {
"type": "string",
"pattern": "^[A-Za-z][A-Za-z0-9_.-]{0,63}$"
},
"additionalProperties": {
"oneOf": [
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "text"
},
"value": {
"type": "string",
"maxLength": 2000
}
},
"required": [
"kind",
"value"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "selection"
},
"field": {
"type": "string",
"enum": [
"accounts",
"period",
"timezone",
"platforms",
"dataset",
"reviewed",
"coverage"
]
}
},
"required": [
"kind",
"field"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "metric"
},
"platform": {
"type": "string",
"enum": [
"facebook",
"instagram",
"threads",
"youtube"
]
},
"key": {
"type": "string",
"minLength": 1,
"maxLength": 150
},
"unit": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"grain": {
"type": "string",
"enum": [
"post",
"account"
]
},
"measurementKind": {
"type": "string",
"enum": [
"lifetime",
"snapshot",
"period",
"unknown"
]
},
"accountId": {
"type": "string",
"format": "uuid"
},
"providerResourceId": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 512
},
{
"type": "null"
}
]
},
"sourcePath": {
"type": "string",
"maxLength": 2000
},
"requestId": {
"anyOf": [
{
"type": "string",
"format": "uuid"
},
{
"type": "null"
}
]
}
},
"required": [
"kind",
"platform",
"key",
"unit",
"grain",
"measurementKind"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "formula"
},
"id": {
"type": "string",
"format": "uuid"
},
"version": {
"type": "integer",
"minimum": 1,
"maximum": 1000000
}
},
"required": [
"kind",
"id",
"version"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "table"
},
"source": {
"type": "string",
"enum": [
"measurements",
"formulas"
]
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 100
}
},
"required": [
"kind",
"source",
"limit"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "chart"
},
"source": {
"type": "string",
"const": "publication_by_platform"
}
},
"required": [
"kind",
"source"
],
"additionalProperties": false
}
]
}
},
"createdAt": {
"type": "string",
"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)))$",
"format": "date-time"
}
},
"required": [
"contractVersion",
"workspaceId",
"id",
"version",
"name",
"format",
"sourceBase64",
"sourceSha256",
"mappings",
"createdAt"
],
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false
}工具呼叫範例
以下虛構值已按 contract 驗證,並非真實帳戶 ID、憑證或發佈紀錄。請以已授權範圍回傳的 ID、已準備完成的素材及已審核排程取代,並在寫入前核對平台資格。此頁不會呼叫 API。
{
"name": "sosoapi_get_report_template",
"arguments": {
"workspace_id": "11111111-1111-4111-8111-111111111111",
"id": "11111111-1111-4111-8111-111111111111",
"version": 1
}
}structuredContent
{
"contractVersion": "analytics-template/v1",
"workspaceId": "11111111-1111-4111-8111-111111111111",
"id": "11111111-1111-4111-8111-111111111111",
"version": 1,
"name": "example",
"format": "pptx",
"sourceBase64": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"sourceSha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"mappings": {},
"createdAt": "2099-01-15T09:00:00Z"
}