MCP tool
分析廣告成效
sosoapi_ads_performance_analyze使用明確歸因及確切來源雜湊,分析有數量上限的客戶提供付費報表。不會存取平台或聲稱獲利因果關係。
閱讀 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
}- /advertising-api/performance/analyze: agent:advertising_read · synchronous_http_response
輸入欄位
必填表示在所屬物件及所選分支內必須提供;子欄位必填不代表可選的父物件亦變成必填。以下欄位名稱及規則直接來自 contract。
| 欄位/分支 | 類型/必填 | 限制 |
|---|---|---|
$ | object父物件內必填 |
|
workspace_id | string父物件內必填 |
|
source_kind | string父物件內必填 |
|
source_id | string父物件內必填 |
|
provider_api_version | string父物件內必填 |
|
provider_account_id | string父物件內必填 |
|
currency | string父物件內必填 |
|
timezone | string父物件內必填 |
|
level | string父物件內必填 |
|
start_date | string父物件內必填 |
|
end_date | string父物件內必填 |
|
action_attribution_windows | array父物件內必填 |
|
action_attribution_windows[] | string可選/陣列項目 |
|
action_report_time | string父物件內必填 |
|
conversion_action_type | string父物件內必填 |
|
revenue_action_type | string父物件內必填 |
|
complete | boolean父物件內必填 | — |
rows | array父物件內必填 |
|
rows[] | object可選/陣列項目 |
|
rows[].account_id | string父物件內必填 |
|
rows[].account_currency | string父物件內必填 |
|
rows[].campaign_id | string父物件內必填 |
|
rows[].campaign_name | string可選/陣列項目 |
|
rows[].adset_id | string可選/陣列項目 |
|
rows[].ad_id | string可選/陣列項目 |
|
rows[].date_start | string父物件內必填 |
|
rows[].date_stop | string父物件內必填 |
|
rows[].spend | string可選/陣列項目 |
|
rows[].clicks | string可選/陣列項目 |
|
rows[].actions | array可選/陣列項目 |
|
rows[].actions[] | object可選/陣列項目 |
|
rows[].actions[].action_type | string父物件內必填 |
|
rows[].actions[].value | string可選/陣列項目 |
|
rows[].actions[].1d_click | string可選/陣列項目 |
|
rows[].actions[].7d_click | string可選/陣列項目 |
|
rows[].actions[].1d_view | string可選/陣列項目 |
|
rows[].action_values | array可選/陣列項目 |
|
rows[].action_values[] | object可選/陣列項目 |
|
rows[].action_values[].action_type | string父物件內必填 |
|
rows[].action_values[].value | string可選/陣列項目 |
|
rows[].action_values[].1d_click | string可選/陣列項目 |
|
rows[].action_values[].7d_click | string可選/陣列項目 |
|
rows[].action_values[].1d_view | string可選/陣列項目 |
|
完整 JSON Schema
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"format": "uuid"
},
"source_kind": {
"type": "string",
"enum": [
"customer_import",
"official_meta_api"
]
},
"source_id": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"provider_api_version": {
"type": "string",
"enum": [
"v26.0"
]
},
"provider_account_id": {
"$ref": "#/$defs/s1"
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$"
},
"timezone": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"level": {
"type": "string",
"enum": [
"campaign",
"adset",
"ad"
]
},
"start_date": {
"$ref": "#/$defs/s2"
},
"end_date": {
"$ref": "#/$defs/s2"
},
"action_attribution_windows": {
"minItems": 1,
"maxItems": 1,
"type": "array",
"items": {
"type": "string",
"enum": [
"1d_click",
"7d_click",
"1d_view"
]
}
},
"action_report_time": {
"type": "string",
"enum": [
"impression",
"conversion"
]
},
"conversion_action_type": {
"$ref": "#/$defs/s3"
},
"revenue_action_type": {
"$ref": "#/$defs/s3"
},
"complete": {
"type": "boolean"
},
"rows": {
"maxItems": 500,
"type": "array",
"items": {
"type": "object",
"properties": {
"account_id": {
"$ref": "#/$defs/s1"
},
"account_currency": {
"type": "string",
"pattern": "^[A-Z]{3}$"
},
"campaign_id": {
"$ref": "#/$defs/s1"
},
"campaign_name": {
"type": "string",
"maxLength": 200
},
"adset_id": {
"$ref": "#/$defs/s1"
},
"ad_id": {
"$ref": "#/$defs/s1"
},
"date_start": {
"$ref": "#/$defs/s2"
},
"date_stop": {
"$ref": "#/$defs/s2"
},
"spend": {
"type": "string",
"pattern": "^\\d{1,12}(?:\\.\\d{1,6})?$"
},
"clicks": {
"type": "string",
"pattern": "^\\d{1,15}$"
},
"actions": {
"$ref": "#/$defs/s0"
},
"action_values": {
"$ref": "#/$defs/s0"
}
},
"required": [
"account_id",
"account_currency",
"campaign_id",
"date_start",
"date_stop"
],
"additionalProperties": false
}
}
},
"required": [
"workspace_id",
"source_kind",
"source_id",
"provider_api_version",
"provider_account_id",
"currency",
"timezone",
"level",
"start_date",
"end_date",
"action_attribution_windows",
"action_report_time",
"conversion_action_type",
"revenue_action_type",
"complete",
"rows"
],
"additionalProperties": false,
"$defs": {
"s0": {
"maxItems": 100,
"type": "array",
"items": {
"type": "object",
"properties": {
"action_type": {
"type": "string",
"pattern": "^[a-z][a-z0-9_.]{0,99}$"
},
"value": {
"type": "string",
"pattern": "^\\d{1,12}(?:\\.\\d{1,6})?$"
},
"1d_click": {
"type": "string",
"pattern": "^\\d{1,12}(?:\\.\\d{1,6})?$"
},
"7d_click": {
"type": "string",
"pattern": "^\\d{1,12}(?:\\.\\d{1,6})?$"
},
"1d_view": {
"type": "string",
"pattern": "^\\d{1,12}(?:\\.\\d{1,6})?$"
}
},
"required": [
"action_type"
],
"additionalProperties": false
}
},
"s1": {
"type": "string",
"pattern": "^[1-9]\\d{1,24}$"
},
"s2": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"s3": {
"type": "string",
"pattern": "^[a-z][a-z0-9_.]{0,99}$"
}
}
}結構化輸出
此 schema 描述成功工具結果的 structuredContent。MCP envelope 亦包括 content,失敗時可能設定 isError;請勿將文字收據或已接受的請求視為平台終態。權限及重試規則請參閱對應的 API 操作。
必填表示在所屬物件及所選分支內必須提供;子欄位必填不代表可選的父物件亦變成必填。以下欄位名稱及規則直接來自 contract。
| 欄位/分支 | 類型/必填 | 限制 |
|---|---|---|
$ | object父物件內必填 |
|
contract_version | string父物件內必填 |
|
source_id | string父物件內必填 |
|
source_sha256 | string父物件內必填 |
|
identity_verification | string父物件內必填 |
|
currency | string父物件內必填 |
|
timezone | string父物件內必填 |
|
selection | object父物件內必填 |
|
selection.provider_api_version | string父物件內必填 |
|
selection.provider_account_id | string父物件內必填 |
|
selection.currency | string父物件內必填 |
|
selection.timezone | string父物件內必填 |
|
selection.level | string父物件內必填 |
|
selection.start_date | string父物件內必填 |
|
selection.end_date | string父物件內必填 |
|
selection.action_attribution_windows | array父物件內必填 |
|
selection.action_attribution_windows[] | string可選/陣列項目 |
|
selection.action_report_time | string父物件內必填 |
|
selection.conversion_action_type | string父物件內必填 |
|
selection.revenue_action_type | string父物件內必填 |
|
complete | boolean父物件內必填 | — |
rows | array父物件內必填 |
|
rows[] | object可選/陣列項目 |
|
rows[].row_id | string父物件內必填 |
|
rows[].metrics | object父物件內必填 |
|
rows[].metrics.spend | object父物件內必填 |
|
rows[].metrics.spend.value | string | null父物件內必填 | — |
rows[].metrics.spend.valueanyOf 1 | string父物件內必填 |
|
rows[].metrics.spend.valueanyOf 2 | null父物件內必填 | — |
rows[].metrics.spend.unit | string父物件內必填 |
|
rows[].metrics.spend.availability | string父物件內必填 |
|
rows[].metrics.spend.reason | string | null父物件內必填 | — |
rows[].metrics.spend.reasonanyOf 1 | string父物件內必填 |
|
rows[].metrics.spend.reasonanyOf 2 | null父物件內必填 | — |
rows[].metrics.spend.input_refs | array父物件內必填 |
|
rows[].metrics.spend.input_refs[] | string可選/陣列項目 |
|
rows[].metrics.clicks | object父物件內必填 |
|
rows[].metrics.clicks.value | string | null父物件內必填 | — |
rows[].metrics.clicks.valueanyOf 1 | string父物件內必填 |
|
rows[].metrics.clicks.valueanyOf 2 | null父物件內必填 | — |
rows[].metrics.clicks.unit | string父物件內必填 |
|
rows[].metrics.clicks.availability | string父物件內必填 |
|
rows[].metrics.clicks.reason | string | null父物件內必填 | — |
rows[].metrics.clicks.reasonanyOf 1 | string父物件內必填 |
|
rows[].metrics.clicks.reasonanyOf 2 | null父物件內必填 | — |
rows[].metrics.clicks.input_refs | array父物件內必填 |
|
rows[].metrics.clicks.input_refs[] | string可選/陣列項目 |
|
rows[].metrics.conversions | object父物件內必填 |
|
rows[].metrics.conversions.value | string | null父物件內必填 | — |
rows[].metrics.conversions.valueanyOf 1 | string父物件內必填 |
|
rows[].metrics.conversions.valueanyOf 2 | null父物件內必填 | — |
rows[].metrics.conversions.unit | string父物件內必填 |
|
rows[].metrics.conversions.availability | string父物件內必填 |
|
rows[].metrics.conversions.reason | string | null父物件內必填 | — |
rows[].metrics.conversions.reasonanyOf 1 | string父物件內必填 |
|
rows[].metrics.conversions.reasonanyOf 2 | null父物件內必填 | — |
rows[].metrics.conversions.input_refs | array父物件內必填 |
|
rows[].metrics.conversions.input_refs[] | string可選/陣列項目 |
|
rows[].metrics.attributed_revenue | object父物件內必填 |
|
rows[].metrics.attributed_revenue.value | string | null父物件內必填 | — |
rows[].metrics.attributed_revenue.valueanyOf 1 | string父物件內必填 |
|
rows[].metrics.attributed_revenue.valueanyOf 2 | null父物件內必填 | — |
rows[].metrics.attributed_revenue.unit | string父物件內必填 |
|
rows[].metrics.attributed_revenue.availability | string父物件內必填 |
|
rows[].metrics.attributed_revenue.reason | string | null父物件內必填 | — |
rows[].metrics.attributed_revenue.reasonanyOf 1 | string父物件內必填 |
|
rows[].metrics.attributed_revenue.reasonanyOf 2 | null父物件內必填 | — |
rows[].metrics.attributed_revenue.input_refs | array父物件內必填 |
|
rows[].metrics.attributed_revenue.input_refs[] | string可選/陣列項目 |
|
rows[].metrics.cpc | object父物件內必填 |
|
rows[].metrics.cpc.value | string | null父物件內必填 | — |
rows[].metrics.cpc.valueanyOf 1 | string父物件內必填 |
|
rows[].metrics.cpc.valueanyOf 2 | null父物件內必填 | — |
rows[].metrics.cpc.unit | string父物件內必填 |
|
rows[].metrics.cpc.availability | string父物件內必填 |
|
rows[].metrics.cpc.reason | string | null父物件內必填 | — |
rows[].metrics.cpc.reasonanyOf 1 | string父物件內必填 |
|
rows[].metrics.cpc.reasonanyOf 2 | null父物件內必填 | — |
rows[].metrics.cpc.input_refs | array父物件內必填 |
|
rows[].metrics.cpc.input_refs[] | string可選/陣列項目 |
|
rows[].metrics.cpa | object父物件內必填 |
|
rows[].metrics.cpa.value | string | null父物件內必填 | — |
rows[].metrics.cpa.valueanyOf 1 | string父物件內必填 |
|
rows[].metrics.cpa.valueanyOf 2 | null父物件內必填 | — |
rows[].metrics.cpa.unit | string父物件內必填 |
|
rows[].metrics.cpa.availability | string父物件內必填 |
|
rows[].metrics.cpa.reason | string | null父物件內必填 | — |
rows[].metrics.cpa.reasonanyOf 1 | string父物件內必填 |
|
rows[].metrics.cpa.reasonanyOf 2 | null父物件內必填 | — |
rows[].metrics.cpa.input_refs | array父物件內必填 |
|
rows[].metrics.cpa.input_refs[] | string可選/陣列項目 |
|
rows[].metrics.attributed_roas | object父物件內必填 |
|
rows[].metrics.attributed_roas.value | string | null父物件內必填 | — |
rows[].metrics.attributed_roas.valueanyOf 1 | string父物件內必填 |
|
rows[].metrics.attributed_roas.valueanyOf 2 | null父物件內必填 | — |
rows[].metrics.attributed_roas.unit | string父物件內必填 |
|
rows[].metrics.attributed_roas.availability | string父物件內必填 |
|
rows[].metrics.attributed_roas.reason | string | null父物件內必填 | — |
rows[].metrics.attributed_roas.reasonanyOf 1 | string父物件內必填 |
|
rows[].metrics.attributed_roas.reasonanyOf 2 | null父物件內必填 | — |
rows[].metrics.attributed_roas.input_refs | array父物件內必填 |
|
rows[].metrics.attributed_roas.input_refs[] | string可選/陣列項目 |
|
totals | object父物件內必填 |
|
totals.spend | object父物件內必填 |
|
totals.spend.value | string | null父物件內必填 | — |
totals.spend.valueanyOf 1 | string父物件內必填 |
|
totals.spend.valueanyOf 2 | null父物件內必填 | — |
totals.spend.unit | string父物件內必填 |
|
totals.spend.availability | string父物件內必填 |
|
totals.spend.reason | string | null父物件內必填 | — |
totals.spend.reasonanyOf 1 | string父物件內必填 |
|
totals.spend.reasonanyOf 2 | null父物件內必填 | — |
totals.spend.input_refs | array父物件內必填 |
|
totals.spend.input_refs[] | string可選/陣列項目 |
|
totals.clicks | object父物件內必填 |
|
totals.clicks.value | string | null父物件內必填 | — |
totals.clicks.valueanyOf 1 | string父物件內必填 |
|
totals.clicks.valueanyOf 2 | null父物件內必填 | — |
totals.clicks.unit | string父物件內必填 |
|
totals.clicks.availability | string父物件內必填 |
|
totals.clicks.reason | string | null父物件內必填 | — |
totals.clicks.reasonanyOf 1 | string父物件內必填 |
|
totals.clicks.reasonanyOf 2 | null父物件內必填 | — |
totals.clicks.input_refs | array父物件內必填 |
|
totals.clicks.input_refs[] | string可選/陣列項目 |
|
totals.conversions | object父物件內必填 |
|
totals.conversions.value | string | null父物件內必填 | — |
totals.conversions.valueanyOf 1 | string父物件內必填 |
|
totals.conversions.valueanyOf 2 | null父物件內必填 | — |
totals.conversions.unit | string父物件內必填 |
|
totals.conversions.availability | string父物件內必填 |
|
totals.conversions.reason | string | null父物件內必填 | — |
totals.conversions.reasonanyOf 1 | string父物件內必填 |
|
totals.conversions.reasonanyOf 2 | null父物件內必填 | — |
totals.conversions.input_refs | array父物件內必填 |
|
totals.conversions.input_refs[] | string可選/陣列項目 |
|
totals.attributed_revenue | object父物件內必填 |
|
totals.attributed_revenue.value | string | null父物件內必填 | — |
totals.attributed_revenue.valueanyOf 1 | string父物件內必填 |
|
totals.attributed_revenue.valueanyOf 2 | null父物件內必填 | — |
totals.attributed_revenue.unit | string父物件內必填 |
|
totals.attributed_revenue.availability | string父物件內必填 |
|
totals.attributed_revenue.reason | string | null父物件內必填 | — |
totals.attributed_revenue.reasonanyOf 1 | string父物件內必填 |
|
totals.attributed_revenue.reasonanyOf 2 | null父物件內必填 | — |
totals.attributed_revenue.input_refs | array父物件內必填 |
|
totals.attributed_revenue.input_refs[] | string可選/陣列項目 |
|
totals.cpc | object父物件內必填 |
|
totals.cpc.value | string | null父物件內必填 | — |
totals.cpc.valueanyOf 1 | string父物件內必填 |
|
totals.cpc.valueanyOf 2 | null父物件內必填 | — |
totals.cpc.unit | string父物件內必填 |
|
totals.cpc.availability | string父物件內必填 |
|
totals.cpc.reason | string | null父物件內必填 | — |
totals.cpc.reasonanyOf 1 | string父物件內必填 |
|
totals.cpc.reasonanyOf 2 | null父物件內必填 | — |
totals.cpc.input_refs | array父物件內必填 |
|
totals.cpc.input_refs[] | string可選/陣列項目 |
|
totals.cpa | object父物件內必填 |
|
totals.cpa.value | string | null父物件內必填 | — |
totals.cpa.valueanyOf 1 | string父物件內必填 |
|
totals.cpa.valueanyOf 2 | null父物件內必填 | — |
totals.cpa.unit | string父物件內必填 |
|
totals.cpa.availability | string父物件內必填 |
|
totals.cpa.reason | string | null父物件內必填 | — |
totals.cpa.reasonanyOf 1 | string父物件內必填 |
|
totals.cpa.reasonanyOf 2 | null父物件內必填 | — |
totals.cpa.input_refs | array父物件內必填 |
|
totals.cpa.input_refs[] | string可選/陣列項目 |
|
totals.attributed_roas | object父物件內必填 |
|
totals.attributed_roas.value | string | null父物件內必填 | — |
totals.attributed_roas.valueanyOf 1 | string父物件內必填 |
|
totals.attributed_roas.valueanyOf 2 | null父物件內必填 | — |
totals.attributed_roas.unit | string父物件內必填 |
|
totals.attributed_roas.availability | string父物件內必填 |
|
totals.attributed_roas.reason | string | null父物件內必填 | — |
totals.attributed_roas.reasonanyOf 1 | string父物件內必填 |
|
totals.attributed_roas.reasonanyOf 2 | null父物件內必填 | — |
totals.attributed_roas.input_refs | array父物件內必填 |
|
totals.attributed_roas.input_refs[] | string可選/陣列項目 |
|
gaps | array父物件內必填 |
|
gaps[] | string可選/陣列項目 |
|
suggestions | array父物件內必填 |
|
suggestions[] | object可選/陣列項目 |
|
suggestions[].rule_id | string父物件內必填 |
|
suggestions[].rule_version | number父物件內必填 |
|
suggestions[].proposal | string父物件內必填 |
|
suggestions[].input_refs | array父物件內必填 |
|
suggestions[].input_refs[] | string可選/陣列項目 |
|
suggestions[].limitations | string父物件內必填 |
|
完整 JSON Schema
{
"type": "object",
"properties": {
"contract_version": {
"type": "string",
"const": "ad-performance/v1"
},
"source_id": {
"type": "string",
"maxLength": 100
},
"source_sha256": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"identity_verification": {
"type": "string",
"enum": [
"customer_supplied",
"accepted_provider_grant"
]
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$"
},
"timezone": {
"type": "string",
"maxLength": 100
},
"selection": {
"type": "object",
"properties": {
"provider_api_version": {
"type": "string",
"const": "v26.0"
},
"provider_account_id": {
"type": "string",
"pattern": "^[1-9]\\d{1,24}$"
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$"
},
"timezone": {
"type": "string",
"maxLength": 100
},
"level": {
"type": "string",
"enum": [
"campaign",
"adset",
"ad"
]
},
"start_date": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"end_date": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"action_attribution_windows": {
"minItems": 1,
"maxItems": 1,
"type": "array",
"items": {
"type": "string",
"enum": [
"1d_click",
"7d_click",
"1d_view"
]
}
},
"action_report_time": {
"type": "string",
"enum": [
"impression",
"conversion"
]
},
"conversion_action_type": {
"type": "string",
"maxLength": 100
},
"revenue_action_type": {
"type": "string",
"maxLength": 100
}
},
"required": [
"provider_api_version",
"provider_account_id",
"currency",
"timezone",
"level",
"start_date",
"end_date",
"action_attribution_windows",
"action_report_time",
"conversion_action_type",
"revenue_action_type"
],
"additionalProperties": false
},
"complete": {
"type": "boolean"
},
"rows": {
"maxItems": 500,
"type": "array",
"items": {
"type": "object",
"properties": {
"row_id": {
"type": "string",
"maxLength": 100
},
"metrics": {
"type": "object",
"properties": {
"spend": {
"type": "object",
"properties": {
"value": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d{1,24}(?:\\.\\d{1,6})?$"
},
{
"type": "null"
}
]
},
"unit": {
"type": "string",
"enum": [
"currency",
"count",
"currency_per_click",
"currency_per_conversion",
"ratio"
]
},
"availability": {
"type": "string",
"enum": [
"available",
"missing_input",
"zero_denominator",
"incompatible",
"partial"
]
},
"reason": {
"anyOf": [
{
"type": "string",
"maxLength": 300
},
{
"type": "null"
}
]
},
"input_refs": {
"maxItems": 2000,
"type": "array",
"items": {
"type": "string",
"maxLength": 300
}
}
},
"required": [
"value",
"unit",
"availability",
"reason",
"input_refs"
],
"additionalProperties": false
},
"clicks": {
"type": "object",
"properties": {
"value": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d{1,24}(?:\\.\\d{1,6})?$"
},
{
"type": "null"
}
]
},
"unit": {
"type": "string",
"enum": [
"currency",
"count",
"currency_per_click",
"currency_per_conversion",
"ratio"
]
},
"availability": {
"type": "string",
"enum": [
"available",
"missing_input",
"zero_denominator",
"incompatible",
"partial"
]
},
"reason": {
"anyOf": [
{
"type": "string",
"maxLength": 300
},
{
"type": "null"
}
]
},
"input_refs": {
"maxItems": 2000,
"type": "array",
"items": {
"type": "string",
"maxLength": 300
}
}
},
"required": [
"value",
"unit",
"availability",
"reason",
"input_refs"
],
"additionalProperties": false
},
"conversions": {
"type": "object",
"properties": {
"value": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d{1,24}(?:\\.\\d{1,6})?$"
},
{
"type": "null"
}
]
},
"unit": {
"type": "string",
"enum": [
"currency",
"count",
"currency_per_click",
"currency_per_conversion",
"ratio"
]
},
"availability": {
"type": "string",
"enum": [
"available",
"missing_input",
"zero_denominator",
"incompatible",
"partial"
]
},
"reason": {
"anyOf": [
{
"type": "string",
"maxLength": 300
},
{
"type": "null"
}
]
},
"input_refs": {
"maxItems": 2000,
"type": "array",
"items": {
"type": "string",
"maxLength": 300
}
}
},
"required": [
"value",
"unit",
"availability",
"reason",
"input_refs"
],
"additionalProperties": false
},
"attributed_revenue": {
"type": "object",
"properties": {
"value": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d{1,24}(?:\\.\\d{1,6})?$"
},
{
"type": "null"
}
]
},
"unit": {
"type": "string",
"enum": [
"currency",
"count",
"currency_per_click",
"currency_per_conversion",
"ratio"
]
},
"availability": {
"type": "string",
"enum": [
"available",
"missing_input",
"zero_denominator",
"incompatible",
"partial"
]
},
"reason": {
"anyOf": [
{
"type": "string",
"maxLength": 300
},
{
"type": "null"
}
]
},
"input_refs": {
"maxItems": 2000,
"type": "array",
"items": {
"type": "string",
"maxLength": 300
}
}
},
"required": [
"value",
"unit",
"availability",
"reason",
"input_refs"
],
"additionalProperties": false
},
"cpc": {
"type": "object",
"properties": {
"value": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d{1,24}(?:\\.\\d{1,6})?$"
},
{
"type": "null"
}
]
},
"unit": {
"type": "string",
"enum": [
"currency",
"count",
"currency_per_click",
"currency_per_conversion",
"ratio"
]
},
"availability": {
"type": "string",
"enum": [
"available",
"missing_input",
"zero_denominator",
"incompatible",
"partial"
]
},
"reason": {
"anyOf": [
{
"type": "string",
"maxLength": 300
},
{
"type": "null"
}
]
},
"input_refs": {
"maxItems": 2000,
"type": "array",
"items": {
"type": "string",
"maxLength": 300
}
}
},
"required": [
"value",
"unit",
"availability",
"reason",
"input_refs"
],
"additionalProperties": false
},
"cpa": {
"type": "object",
"properties": {
"value": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d{1,24}(?:\\.\\d{1,6})?$"
},
{
"type": "null"
}
]
},
"unit": {
"type": "string",
"enum": [
"currency",
"count",
"currency_per_click",
"currency_per_conversion",
"ratio"
]
},
"availability": {
"type": "string",
"enum": [
"available",
"missing_input",
"zero_denominator",
"incompatible",
"partial"
]
},
"reason": {
"anyOf": [
{
"type": "string",
"maxLength": 300
},
{
"type": "null"
}
]
},
"input_refs": {
"maxItems": 2000,
"type": "array",
"items": {
"type": "string",
"maxLength": 300
}
}
},
"required": [
"value",
"unit",
"availability",
"reason",
"input_refs"
],
"additionalProperties": false
},
"attributed_roas": {
"type": "object",
"properties": {
"value": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d{1,24}(?:\\.\\d{1,6})?$"
},
{
"type": "null"
}
]
},
"unit": {
"type": "string",
"enum": [
"currency",
"count",
"currency_per_click",
"currency_per_conversion",
"ratio"
]
},
"availability": {
"type": "string",
"enum": [
"available",
"missing_input",
"zero_denominator",
"incompatible",
"partial"
]
},
"reason": {
"anyOf": [
{
"type": "string",
"maxLength": 300
},
{
"type": "null"
}
]
},
"input_refs": {
"maxItems": 2000,
"type": "array",
"items": {
"type": "string",
"maxLength": 300
}
}
},
"required": [
"value",
"unit",
"availability",
"reason",
"input_refs"
],
"additionalProperties": false
}
},
"required": [
"spend",
"clicks",
"conversions",
"attributed_revenue",
"cpc",
"cpa",
"attributed_roas"
],
"additionalProperties": false
}
},
"required": [
"row_id",
"metrics"
],
"additionalProperties": false
}
},
"totals": {
"type": "object",
"properties": {
"spend": {
"type": "object",
"properties": {
"value": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d{1,24}(?:\\.\\d{1,6})?$"
},
{
"type": "null"
}
]
},
"unit": {
"type": "string",
"enum": [
"currency",
"count",
"currency_per_click",
"currency_per_conversion",
"ratio"
]
},
"availability": {
"type": "string",
"enum": [
"available",
"missing_input",
"zero_denominator",
"incompatible",
"partial"
]
},
"reason": {
"anyOf": [
{
"type": "string",
"maxLength": 300
},
{
"type": "null"
}
]
},
"input_refs": {
"maxItems": 2000,
"type": "array",
"items": {
"type": "string",
"maxLength": 300
}
}
},
"required": [
"value",
"unit",
"availability",
"reason",
"input_refs"
],
"additionalProperties": false
},
"clicks": {
"type": "object",
"properties": {
"value": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d{1,24}(?:\\.\\d{1,6})?$"
},
{
"type": "null"
}
]
},
"unit": {
"type": "string",
"enum": [
"currency",
"count",
"currency_per_click",
"currency_per_conversion",
"ratio"
]
},
"availability": {
"type": "string",
"enum": [
"available",
"missing_input",
"zero_denominator",
"incompatible",
"partial"
]
},
"reason": {
"anyOf": [
{
"type": "string",
"maxLength": 300
},
{
"type": "null"
}
]
},
"input_refs": {
"maxItems": 2000,
"type": "array",
"items": {
"type": "string",
"maxLength": 300
}
}
},
"required": [
"value",
"unit",
"availability",
"reason",
"input_refs"
],
"additionalProperties": false
},
"conversions": {
"type": "object",
"properties": {
"value": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d{1,24}(?:\\.\\d{1,6})?$"
},
{
"type": "null"
}
]
},
"unit": {
"type": "string",
"enum": [
"currency",
"count",
"currency_per_click",
"currency_per_conversion",
"ratio"
]
},
"availability": {
"type": "string",
"enum": [
"available",
"missing_input",
"zero_denominator",
"incompatible",
"partial"
]
},
"reason": {
"anyOf": [
{
"type": "string",
"maxLength": 300
},
{
"type": "null"
}
]
},
"input_refs": {
"maxItems": 2000,
"type": "array",
"items": {
"type": "string",
"maxLength": 300
}
}
},
"required": [
"value",
"unit",
"availability",
"reason",
"input_refs"
],
"additionalProperties": false
},
"attributed_revenue": {
"type": "object",
"properties": {
"value": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d{1,24}(?:\\.\\d{1,6})?$"
},
{
"type": "null"
}
]
},
"unit": {
"type": "string",
"enum": [
"currency",
"count",
"currency_per_click",
"currency_per_conversion",
"ratio"
]
},
"availability": {
"type": "string",
"enum": [
"available",
"missing_input",
"zero_denominator",
"incompatible",
"partial"
]
},
"reason": {
"anyOf": [
{
"type": "string",
"maxLength": 300
},
{
"type": "null"
}
]
},
"input_refs": {
"maxItems": 2000,
"type": "array",
"items": {
"type": "string",
"maxLength": 300
}
}
},
"required": [
"value",
"unit",
"availability",
"reason",
"input_refs"
],
"additionalProperties": false
},
"cpc": {
"type": "object",
"properties": {
"value": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d{1,24}(?:\\.\\d{1,6})?$"
},
{
"type": "null"
}
]
},
"unit": {
"type": "string",
"enum": [
"currency",
"count",
"currency_per_click",
"currency_per_conversion",
"ratio"
]
},
"availability": {
"type": "string",
"enum": [
"available",
"missing_input",
"zero_denominator",
"incompatible",
"partial"
]
},
"reason": {
"anyOf": [
{
"type": "string",
"maxLength": 300
},
{
"type": "null"
}
]
},
"input_refs": {
"maxItems": 2000,
"type": "array",
"items": {
"type": "string",
"maxLength": 300
}
}
},
"required": [
"value",
"unit",
"availability",
"reason",
"input_refs"
],
"additionalProperties": false
},
"cpa": {
"type": "object",
"properties": {
"value": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d{1,24}(?:\\.\\d{1,6})?$"
},
{
"type": "null"
}
]
},
"unit": {
"type": "string",
"enum": [
"currency",
"count",
"currency_per_click",
"currency_per_conversion",
"ratio"
]
},
"availability": {
"type": "string",
"enum": [
"available",
"missing_input",
"zero_denominator",
"incompatible",
"partial"
]
},
"reason": {
"anyOf": [
{
"type": "string",
"maxLength": 300
},
{
"type": "null"
}
]
},
"input_refs": {
"maxItems": 2000,
"type": "array",
"items": {
"type": "string",
"maxLength": 300
}
}
},
"required": [
"value",
"unit",
"availability",
"reason",
"input_refs"
],
"additionalProperties": false
},
"attributed_roas": {
"type": "object",
"properties": {
"value": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d{1,24}(?:\\.\\d{1,6})?$"
},
{
"type": "null"
}
]
},
"unit": {
"type": "string",
"enum": [
"currency",
"count",
"currency_per_click",
"currency_per_conversion",
"ratio"
]
},
"availability": {
"type": "string",
"enum": [
"available",
"missing_input",
"zero_denominator",
"incompatible",
"partial"
]
},
"reason": {
"anyOf": [
{
"type": "string",
"maxLength": 300
},
{
"type": "null"
}
]
},
"input_refs": {
"maxItems": 2000,
"type": "array",
"items": {
"type": "string",
"maxLength": 300
}
}
},
"required": [
"value",
"unit",
"availability",
"reason",
"input_refs"
],
"additionalProperties": false
}
},
"required": [
"spend",
"clicks",
"conversions",
"attributed_revenue",
"cpc",
"cpa",
"attributed_roas"
],
"additionalProperties": false
},
"gaps": {
"maxItems": 1000,
"type": "array",
"items": {
"type": "string",
"maxLength": 300
}
},
"suggestions": {
"maxItems": 3,
"type": "array",
"items": {
"type": "object",
"properties": {
"rule_id": {
"type": "string",
"enum": [
"supply_revenue",
"review_comparable_creative_test",
"complete_coverage"
]
},
"rule_version": {
"type": "number",
"const": 1
},
"proposal": {
"type": "string",
"maxLength": 600
},
"input_refs": {
"maxItems": 2000,
"type": "array",
"items": {
"type": "string",
"maxLength": 300
}
},
"limitations": {
"type": "string",
"const": "Observational comparison only; no causal uplift or profitability claim. Human review required."
}
},
"required": [
"rule_id",
"rule_version",
"proposal",
"input_refs",
"limitations"
],
"additionalProperties": false
}
}
},
"required": [
"contract_version",
"source_id",
"source_sha256",
"identity_verification",
"currency",
"timezone",
"selection",
"complete",
"rows",
"totals",
"gaps",
"suggestions"
],
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false
}工具呼叫範例
以下虛構值已按 contract 驗證,並非真實帳戶 ID、憑證或發佈紀錄。請以已授權範圍回傳的 ID、已準備完成的素材及已審核排程取代,並在寫入前核對平台資格。此頁不會呼叫 API。
{
"name": "sosoapi_ads_performance_analyze",
"arguments": {
"workspace_id": "11111111-1111-4111-8111-111111111111",
"source_kind": "customer_import",
"source_id": "example",
"provider_api_version": "v26.0",
"provider_account_id": "12345",
"currency": "USD",
"timezone": "UTC",
"level": "campaign",
"start_date": "2099-01-15",
"end_date": "2099-01-15",
"action_attribution_windows": [
"1d_click"
],
"action_report_time": "impression",
"conversion_action_type": "example",
"revenue_action_type": "example",
"complete": false,
"rows": []
}
}structuredContent
{
"contract_version": "ad-performance/v1",
"source_id": "example",
"source_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"identity_verification": "customer_supplied",
"currency": "USD",
"timezone": "UTC",
"selection": {
"provider_api_version": "v26.0",
"provider_account_id": "12345",
"currency": "USD",
"timezone": "UTC",
"level": "campaign",
"start_date": "2099-01-15",
"end_date": "2099-01-15",
"action_attribution_windows": [
"1d_click"
],
"action_report_time": "impression",
"conversion_action_type": "example",
"revenue_action_type": "example"
},
"complete": false,
"rows": [],
"totals": {
"spend": {
"value": null,
"unit": "currency",
"availability": "available",
"reason": null,
"input_refs": []
},
"clicks": {
"value": null,
"unit": "currency",
"availability": "available",
"reason": null,
"input_refs": []
},
"conversions": {
"value": null,
"unit": "currency",
"availability": "available",
"reason": null,
"input_refs": []
},
"attributed_revenue": {
"value": null,
"unit": "currency",
"availability": "available",
"reason": null,
"input_refs": []
},
"cpc": {
"value": null,
"unit": "currency",
"availability": "available",
"reason": null,
"input_refs": []
},
"cpa": {
"value": null,
"unit": "currency",
"availability": "available",
"reason": null,
"input_refs": []
},
"attributed_roas": {
"value": null,
"unit": "currency",
"availability": "available",
"reason": null,
"input_refs": []
}
},
"gaps": [],
"suggestions": []
}