Ferramenta MCP
Salvar uma versão de modelo de relatório com configuração guiada
sosoapi_save_report_templateSalvar uma versão de modelo de relatório com configuração guiada. Usa o conjunto de dados e a versão explicitamente definidos e revisados; a fonte não é atualizada automaticamente. As entradas de renderização podem ser encaminhadas por um pipe para sosoapi report render --output FILE.
Ler como MarkdownPerfis e transportes
Perfis: full · Transportes: stdio, http
Escolha core ou full para controlar quais ferramentas seu cliente vê; isso não altera suas permissões. O envio de arquivos locais exige stdio e não está disponível por HTTP. Defina SOSOAPI_OUTPUT_SCHEMAS=1 para incluir schemas de saída na descoberta. As ferramentas retornam resultados estruturados com ou sem essa configuração.
Permissões e efeitos colaterais
As anotações ajudam os clientes a descrever uma ferramenta. Cada chamada ainda verifica autenticação, função, acesso a recursos e concessões de capacidades do usuário.
{
"readOnlyHint": false,
"destructiveHint": false,
"idempotentHint": true,
"openWorldHint": false
}- /analytics-api/reporting/templates/save: agent:operate · synchronous_http_response
Campos de entrada
Obrigatório significa obrigatório dentro do objeto pai e da ramificação selecionada. Um filho obrigatório não torna obrigatório um pai opcional. As regras e nomes de campos abaixo são copiados do contrato.
| Campo / ramificação | Tipo / obrigatório | Restrições |
|---|---|---|
$ | objectObrigatório no objeto pai |
|
workspace_id | stringObrigatório no objeto pai |
|
template | objectObrigatório no objeto pai |
|
template.id | stringObrigatório no objeto pai |
|
template.version | integerObrigatório no objeto pai |
|
template.name | stringObrigatório no objeto pai |
|
template.format | stringObrigatório no objeto pai |
|
template.sourceBase64 | stringObrigatório no objeto pai |
|
template.sourceSha256 | stringObrigatório no objeto pai |
|
template.mappings | objectObrigatório no objeto pai |
|
template.mappings.* | objectOpcional / item | — |
template.mappings.*anyOf 1 | objectOpcional / item |
|
template.mappings.*.kindanyOf 1 | stringObrigatório no objeto pai |
|
template.mappings.*.valueanyOf 1 | stringObrigatório no objeto pai |
|
template.mappings.*anyOf 2 | objectOpcional / item |
|
template.mappings.*.kindanyOf 2 | stringObrigatório no objeto pai |
|
template.mappings.*.fieldanyOf 2 | stringObrigatório no objeto pai |
|
template.mappings.*anyOf 3 | objectOpcional / item |
|
template.mappings.*.kindanyOf 3 | stringObrigatório no objeto pai |
|
template.mappings.*.platformanyOf 3 | stringObrigatório no objeto pai |
|
template.mappings.*.keyanyOf 3 | stringObrigatório no objeto pai |
|
template.mappings.*.unitanyOf 3 | stringObrigatório no objeto pai |
|
template.mappings.*.grainanyOf 3 | stringObrigatório no objeto pai |
|
template.mappings.*.measurementKindanyOf 3 | stringObrigatório no objeto pai |
|
template.mappings.*.accountIdanyOf 3 | stringOpcional / item |
|
template.mappings.*.providerResourceIdanyOf 3 | string | nullOpcional / item | — |
template.mappings.*.providerResourceIdanyOf 3 / anyOf 1 | stringOpcional / item |
|
template.mappings.*.providerResourceIdanyOf 3 / anyOf 2 | nullOpcional / item | — |
template.mappings.*.sourcePathanyOf 3 | stringOpcional / item |
|
template.mappings.*.requestIdanyOf 3 | string | nullOpcional / item | — |
template.mappings.*.requestIdanyOf 3 / anyOf 1 | stringOpcional / item |
|
template.mappings.*.requestIdanyOf 3 / anyOf 2 | nullOpcional / item | — |
template.mappings.*anyOf 4 | objectOpcional / item |
|
template.mappings.*.kindanyOf 4 | stringObrigatório no objeto pai |
|
template.mappings.*.idanyOf 4 | stringObrigatório no objeto pai |
|
template.mappings.*.versionanyOf 4 | integerObrigatório no objeto pai |
|
template.mappings.*anyOf 5 | objectOpcional / item |
|
template.mappings.*.kindanyOf 5 | stringObrigatório no objeto pai |
|
template.mappings.*.sourceanyOf 5 | stringObrigatório no objeto pai |
|
template.mappings.*.limitanyOf 5 | integerObrigatório no objeto pai |
|
template.mappings.*anyOf 6 | objectOpcional / item |
|
template.mappings.*.kindanyOf 6 | stringObrigatório no objeto pai |
|
template.mappings.*.sourceanyOf 6 | stringObrigatório no objeto pai |
|
expected_version | integer | nullObrigatório no objeto pai | — |
expected_versionanyOf 1 | integerObrigatório no objeto pai |
|
expected_versionanyOf 2 | nullObrigatório no objeto pai | — |
mutation_id | stringObrigatório no objeto pai |
|
JSON Schema completo
{
"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
}Saída estruturada
Este schema descreve structuredContent em um resultado de ferramenta bem-sucedido. A resposta MCP também inclui content e pode definir isError quando uma chamada falha. Para publicações, consulte o resultado final do post em vez de tratar uma requisição aceita ou resposta de texto como confirmação. A operação de API vinculada explica as permissões e regras de repetição.
Obrigatório significa obrigatório dentro do objeto pai e da ramificação selecionada. Um filho obrigatório não torna obrigatório um pai opcional. As regras e nomes de campos abaixo são copiados do contrato.
| Campo / ramificação | Tipo / obrigatório | Restrições |
|---|---|---|
$ | objectObrigatório no objeto pai |
|
contractVersion | stringObrigatório no objeto pai |
|
workspaceId | stringObrigatório no objeto pai |
|
id | stringObrigatório no objeto pai |
|
version | integerObrigatório no objeto pai |
|
name | stringObrigatório no objeto pai |
|
format | stringObrigatório no objeto pai |
|
sourceBase64 | stringObrigatório no objeto pai |
|
sourceSha256 | stringObrigatório no objeto pai |
|
mappings | objectObrigatório no objeto pai |
|
mappings.* | objectOpcional / item | — |
mappings.*oneOf 1 | objectOpcional / item |
|
mappings.*.kindoneOf 1 | stringObrigatório no objeto pai |
|
mappings.*.valueoneOf 1 | stringObrigatório no objeto pai |
|
mappings.*oneOf 2 | objectOpcional / item |
|
mappings.*.kindoneOf 2 | stringObrigatório no objeto pai |
|
mappings.*.fieldoneOf 2 | stringObrigatório no objeto pai |
|
mappings.*oneOf 3 | objectOpcional / item |
|
mappings.*.kindoneOf 3 | stringObrigatório no objeto pai |
|
mappings.*.platformoneOf 3 | stringObrigatório no objeto pai |
|
mappings.*.keyoneOf 3 | stringObrigatório no objeto pai |
|
mappings.*.unitoneOf 3 | stringObrigatório no objeto pai |
|
mappings.*.grainoneOf 3 | stringObrigatório no objeto pai |
|
mappings.*.measurementKindoneOf 3 | stringObrigatório no objeto pai |
|
mappings.*.accountIdoneOf 3 | stringOpcional / item |
|
mappings.*.providerResourceIdoneOf 3 | string | nullOpcional / item | — |
mappings.*.providerResourceIdoneOf 3 / anyOf 1 | stringOpcional / item |
|
mappings.*.providerResourceIdoneOf 3 / anyOf 2 | nullOpcional / item | — |
mappings.*.sourcePathoneOf 3 | stringOpcional / item |
|
mappings.*.requestIdoneOf 3 | string | nullOpcional / item | — |
mappings.*.requestIdoneOf 3 / anyOf 1 | stringOpcional / item |
|
mappings.*.requestIdoneOf 3 / anyOf 2 | nullOpcional / item | — |
mappings.*oneOf 4 | objectOpcional / item |
|
mappings.*.kindoneOf 4 | stringObrigatório no objeto pai |
|
mappings.*.idoneOf 4 | stringObrigatório no objeto pai |
|
mappings.*.versiononeOf 4 | integerObrigatório no objeto pai |
|
mappings.*oneOf 5 | objectOpcional / item |
|
mappings.*.kindoneOf 5 | stringObrigatório no objeto pai |
|
mappings.*.sourceoneOf 5 | stringObrigatório no objeto pai |
|
mappings.*.limitoneOf 5 | integerObrigatório no objeto pai |
|
mappings.*oneOf 6 | objectOpcional / item |
|
mappings.*.kindoneOf 6 | stringObrigatório no objeto pai |
|
mappings.*.sourceoneOf 6 | stringObrigatório no objeto pai |
|
createdAt | stringObrigatório no objeto pai |
|
JSON Schema completo
{
"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
}Exemplo de chamada de ferramenta
Estes exemplos usam valores fictícios verificados conforme os schemas. Substitua os IDs por aqueles que você tem autorização para usar, a mídia por ativos prontos e as datas pelo horário de publicação confirmado. Confira a elegibilidade da conta antes de enviar uma gravação. Esta página não envia requisições de 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"
}