MCPツール
ガイド付きレポートテンプレートのバージョンを保存
sosoapi_save_report_templateガイド付きレポートテンプレートのバージョンを保存。指定された確認済みデータセットとバージョンを使用し、ソースは自動更新しません。 レンダリング入力は sosoapi report render --output FILE にパイプで渡せます。
Markdownで読むプロファイルと通信方式
プロファイル: full · 通信方式: stdio, http
coreまたはfullで表示ツールを選べますが権限は変わりません。ローカルアップロードはstdioのみでHTTPは非対応です。SOSOAPI_OUTPUT_SCHEMAS=1で検出時に出力スキーマを含めます。設定に関係なく構造化結果を返します。
権限と副作用
注釈はクライアントがツールを説明するためのものです。各呼び出しでは引き続き認証、ロール、リソースアクセス、機能権限を確認します。
{
"readOnlyHint": false,
"destructiveHint": false,
"idempotentHint": true,
"openWorldHint": false
}- /analytics-api/reporting/templates/save: agent:operate · synchronous_http_response
入力フィールド
必須とは、親オブジェクトと選択分岐内で必須という意味です。必須の子があっても任意の親は必須になりません。以下のルールとフィールド名は契約から転記しています。
| フィールド/分岐 | 型/必須 | 制約 |
|---|---|---|
$ | object親要素内で必須 |
|
workspace_id | string親要素内で必須 |
|
template | object親要素内で必須 |
|
template.id | string親要素内で必須 |
|
template.version | integer親要素内で必須 |
|
template.name | string親要素内で必須 |
|
template.format | string親要素内で必須 |
|
template.sourceBase64 | string親要素内で必須 |
|
template.sourceSha256 | string親要素内で必須 |
|
template.mappings | object親要素内で必須 |
|
template.mappings.* | object任意/項目 | — |
template.mappings.*anyOf 1 | object任意/項目 |
|
template.mappings.*.kindanyOf 1 | string親要素内で必須 |
|
template.mappings.*.valueanyOf 1 | string親要素内で必須 |
|
template.mappings.*anyOf 2 | object任意/項目 |
|
template.mappings.*.kindanyOf 2 | string親要素内で必須 |
|
template.mappings.*.fieldanyOf 2 | string親要素内で必須 |
|
template.mappings.*anyOf 3 | object任意/項目 |
|
template.mappings.*.kindanyOf 3 | string親要素内で必須 |
|
template.mappings.*.platformanyOf 3 | string親要素内で必須 |
|
template.mappings.*.keyanyOf 3 | string親要素内で必須 |
|
template.mappings.*.unitanyOf 3 | string親要素内で必須 |
|
template.mappings.*.grainanyOf 3 | string親要素内で必須 |
|
template.mappings.*.measurementKindanyOf 3 | string親要素内で必須 |
|
template.mappings.*.accountIdanyOf 3 | string任意/項目 |
|
template.mappings.*.providerResourceIdanyOf 3 | string | null任意/項目 | — |
template.mappings.*.providerResourceIdanyOf 3 / anyOf 1 | string任意/項目 |
|
template.mappings.*.providerResourceIdanyOf 3 / anyOf 2 | null任意/項目 | — |
template.mappings.*.sourcePathanyOf 3 | string任意/項目 |
|
template.mappings.*.requestIdanyOf 3 | string | null任意/項目 | — |
template.mappings.*.requestIdanyOf 3 / anyOf 1 | string任意/項目 |
|
template.mappings.*.requestIdanyOf 3 / anyOf 2 | null任意/項目 | — |
template.mappings.*anyOf 4 | object任意/項目 |
|
template.mappings.*.kindanyOf 4 | string親要素内で必須 |
|
template.mappings.*.idanyOf 4 | string親要素内で必須 |
|
template.mappings.*.versionanyOf 4 | integer親要素内で必須 |
|
template.mappings.*anyOf 5 | object任意/項目 |
|
template.mappings.*.kindanyOf 5 | string親要素内で必須 |
|
template.mappings.*.sourceanyOf 5 | string親要素内で必須 |
|
template.mappings.*.limitanyOf 5 | integer親要素内で必須 |
|
template.mappings.*anyOf 6 | object任意/項目 |
|
template.mappings.*.kindanyOf 6 | string親要素内で必須 |
|
template.mappings.*.sourceanyOf 6 | string親要素内で必須 |
|
expected_version | integer | null親要素内で必須 | — |
expected_versionanyOf 1 | integer親要素内で必須 |
|
expected_versionanyOf 2 | null親要素内で必須 | — |
mutation_id | string親要素内で必須 |
|
完全なJSON Schema
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"format": "uuid"
},
"template": {
"type": "object",
"properties": {
"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",
"additionalProperties": {
"anyOf": [
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"text"
]
},
"value": {
"type": "string",
"maxLength": 2000
}
},
"required": [
"kind",
"value"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"selection"
]
},
"field": {
"type": "string",
"enum": [
"accounts",
"period",
"timezone",
"platforms",
"dataset",
"reviewed",
"coverage"
]
}
},
"required": [
"kind",
"field"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"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",
"enum": [
"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",
"enum": [
"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",
"enum": [
"chart"
]
},
"source": {
"type": "string",
"enum": [
"publication_by_platform"
]
}
},
"required": [
"kind",
"source"
],
"additionalProperties": false
}
]
}
}
},
"required": [
"id",
"version",
"name",
"format",
"sourceBase64",
"sourceSha256",
"mappings"
],
"additionalProperties": false
},
"expected_version": {
"anyOf": [
{
"type": "integer",
"minimum": 1,
"maximum": 1000000
},
{
"type": "null"
}
]
},
"mutation_id": {
"type": "string",
"format": "uuid"
}
},
"required": [
"workspace_id",
"template",
"expected_version",
"mutation_id"
],
"additionalProperties": false
}構造化された出力
このスキーマは、成功時のツール結果に含まれるstructuredContentを説明します。MCPレスポンスはcontentも含み、失敗時にisErrorを設定する場合があります。公開では、受理やテキスト応答を確認済みと扱わず、投稿の最終結果を取得してください。権限・再試行ルールはリンク先のAPI操作をご覧ください。
必須とは、親オブジェクトと選択分岐内で必須という意味です。必須の子があっても任意の親は必須になりません。以下のルールとフィールド名は契約から転記しています。
| フィールド/分岐 | 型/必須 | 制約 |
|---|---|---|
$ | 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
}ツール呼び出しの例
スキーマ確認済みの架空値の例です。認可されたID、準備済みメディア、確認済みの公開日時に置き換え、書き込み前に適格性を確認してください。このページはAPIを呼びません。
{
"name": "sosoapi_save_report_template",
"arguments": {
"workspace_id": "11111111-1111-4111-8111-111111111111",
"template": {
"id": "11111111-1111-4111-8111-111111111111",
"version": 1,
"name": "example",
"format": "pptx",
"sourceBase64": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"sourceSha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"mappings": {}
},
"expected_version": null,
"mutation_id": "11111111-1111-4111-8111-111111111111"
}
}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"
}