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
इनपुट फ़ील्ड
Required का अर्थ पैरेंट ऑब्जेक्ट और चुनी शाखा के भीतर अनिवार्य है। अनिवार्य चाइल्ड से वैकल्पिक पैरेंट अनिवार्य नहीं होता। नीचे के नियम और फ़ील्ड नाम कॉन्ट्रैक्ट से लिए गए हैं।
| फ़ील्ड / शाखा | प्रकार / अनिवार्य | शर्तें |
|---|---|---|
$ | 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 ऑपरेशन अनुमतियाँ और पुनः प्रयास के नियम समझाता है।
Required का अर्थ पैरेंट ऑब्जेक्ट और चुनी शाखा के भीतर अनिवार्य है। अनिवार्य चाइल्ड से वैकल्पिक पैरेंट अनिवार्य नहीं होता। नीचे के नियम और फ़ील्ड नाम कॉन्ट्रैक्ट से लिए गए हैं।
| फ़ील्ड / शाखा | प्रकार / अनिवार्य | शर्तें |
|---|---|---|
$ | 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
}टूल कॉल का उदाहरण
उदाहरणों में स्कीमा से जाँचे काल्पनिक मान हैं। IDs को अधिकृत IDs, मीडिया को तैयार एसेट और तारीखों को पुष्ट प्रकाशन समय से बदलें। राइट सबमिट करने से पहले खाते की पात्रता जाँचें। यह पेज 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"
}