SYSLED Developers · referência técnica

MCP SYSLED 0.7.1

34 ferramentas documentadas · Beta

Validação nativa pendente. Referência técnica Beta. A validação nativa desta versão em Claude Desktop e ChatGPT web permanece pendente. Publicar a documentação não homologa a execução das ferramentas nem libera produção ou um Plugin público.

O catálogo descreve as ferramentas da versão. As ferramentas visíveis e executáveis dependem da identidade, dos escopos concedidos, das permissões e da disponibilidade da instância. Cobertura documental não significa execução validada de todas as ferramentas.

Conexão e permissões

Use a URL canônica /mcp fornecida pelo administrador da instância. Clientes compatíveis usam OAuth Authorization Code com PKCE S256 e registro de callback. Confira aplicativo, empresa e escopos antes de autorizar. Não entregue o token da sessão SYSLED ao cliente externo nem inclua tokens na URL.

Conceda apenas o necessário. Ampliar escopos exige nova autorização; renovação não amplia permissão. Revogação impede novas requisições, mas uma operação já iniciada pode terminar. Esta página não configura conexão nem executa chamadas.

Confirmação, recibos e limites

34 de 34 ferramentas

wa_healthSaúde e canais autorizados

Leitura

Consulta saúde e canais autorizados. A disponibilidade de detalhes depende da forma de autenticação.

Escopos OAuth: mcp:read.

Parâmetros de wa_health
NomeObrigatórioDescrição
channel_idNãoUUID opcional do canal WhatsApp para incluir delivery-health (só modo JWT)
Schema de entrada e limites
{
  "type": "object",
  "properties": {
    "channel_id": {
      "type": "string",
      "format": "uuid",
      "maxLength": 8192
    }
  },
  "additionalProperties": false
}
Schema de saída
{
  "type": "object",
  "required": [
    "auth_mode",
    "ok",
    "authenticated",
    "instances"
  ],
  "properties": {
    "auth_mode": {
      "enum": [
        "jwt",
        "v1",
        "oauth"
      ]
    },
    "ok": {
      "type": "boolean"
    },
    "authenticated": {
      "const": true
    },
    "instances": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id"
        ],
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          }
        }
      }
    }
  }
}

Erros possíveis, lista não exaustiva: BAD_REQUEST, UNAUTHORIZED, NOT_FOUND, RATE_LIMITED, UPSTREAM_ERROR, UPSTREAM_INVALID_RESPONSE, UPSTREAM_TIMEOUT, NETWORK_ERROR, CANCELLED.

wa_list_chatsListar conversas

Leitura

Lista conversas com paginação. Alguns filtros dependem da forma de autenticação.

Escopos OAuth: mcp:read.

Parâmetros de wa_list_chats
NomeObrigatórioDescrição
qNãoBusca por nome/telefone (JWT; ignorado no v1)
limitNãoMáximo de resultados (default 20)
pageNãoPágina (default 1)
statusNãoFiltro por status da conversa
channel_idNãoUUID do canal
assignee_idNãoUUID do responsável (JWT; ignorado no v1)
filterNãoFiltro de inbox (JWT; ignorado no v1)
Schema de entrada e limites
{
  "type": "object",
  "properties": {
    "q": {
      "type": "string",
      "maxLength": 8192,
      "pattern": "^\\s*\\S[\\s\\S]*$"
    },
    "limit": {
      "type": "integer",
      "default": 20,
      "minimum": 1,
      "maximum": 200
    },
    "page": {
      "type": "integer",
      "default": 1,
      "minimum": 1,
      "maximum": 1000000
    },
    "status": {
      "type": "string",
      "enum": [
        "open",
        "pending",
        "resolved",
        "archived"
      ],
      "maxLength": 8192
    },
    "channel_id": {
      "type": "string",
      "format": "uuid",
      "maxLength": 8192
    },
    "assignee_id": {
      "type": "string",
      "format": "uuid",
      "maxLength": 8192
    },
    "filter": {
      "type": "string",
      "maxLength": 8192
    }
  },
  "additionalProperties": false
}
Schema de saída
{
  "type": "object",
  "required": [
    "auth_mode",
    "chats",
    "meta"
  ],
  "properties": {
    "auth_mode": {
      "enum": [
        "jwt",
        "v1",
        "oauth"
      ]
    },
    "chats": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id"
        ],
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "status": {
            "type": [
              "string",
              "null"
            ]
          },
          "unread_count": {
            "type": "integer",
            "minimum": 0
          }
        }
      }
    },
    "meta": {
      "type": "object",
      "required": [
        "total"
      ],
      "properties": {
        "total": {
          "type": "integer",
          "minimum": 0
        },
        "total_count": {
          "type": [
            "integer",
            "null"
          ],
          "minimum": 0
        },
        "page": {
          "type": "integer",
          "minimum": 1
        },
        "limit": {
          "type": "integer",
          "minimum": 1,
          "maximum": 200
        },
        "totalPages": {
          "type": "integer",
          "minimum": 0
        },
        "hasMore": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "next_page": {
          "type": [
            "integer",
            "null"
          ],
          "minimum": 1
        }
      }
    }
  }
}

Erros possíveis, lista não exaustiva: BAD_REQUEST, UNAUTHORIZED, NOT_FOUND, RATE_LIMITED, UPSTREAM_ERROR, UPSTREAM_INVALID_RESPONSE, UPSTREAM_TIMEOUT, NETWORK_ERROR, CANCELLED.

wa_get_chatLer uma conversa

Leitura

Lê os dados de uma conversa à qual a identidade atual tem acesso.

Escopos OAuth: mcp:read.

Parâmetros de wa_get_chat
NomeObrigatórioDescrição
chat_idSimUUID da conversa (conversation id)
Schema de entrada e limites
{
  "type": "object",
  "properties": {
    "chat_id": {
      "type": "string",
      "format": "uuid",
      "maxLength": 8192
    }
  },
  "required": [
    "chat_id"
  ],
  "additionalProperties": false
}
Schema de saída
{
  "type": "object",
  "required": [
    "auth_mode",
    "chat"
  ],
  "properties": {
    "auth_mode": {
      "enum": [
        "jwt",
        "v1",
        "oauth"
      ]
    },
    "chat": {
      "type": "object",
      "required": [
        "id"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "status": {
          "type": [
            "string",
            "null"
          ]
        },
        "unread_count": {
          "type": "integer",
          "minimum": 0
        }
      }
    }
  }
}

Erros possíveis, lista não exaustiva: BAD_REQUEST, UNAUTHORIZED, NOT_FOUND, RATE_LIMITED, UPSTREAM_ERROR, UPSTREAM_INVALID_RESPONSE, UPSTREAM_TIMEOUT, NETWORK_ERROR, CANCELLED.

wa_list_messagesLer histórico paginado

Leitura

Lê uma página do histórico. Reutilize next_cursor sem alteração para buscar mensagens anteriores.

Escopos OAuth: mcp:read.

Parâmetros de wa_list_messages
NomeObrigatórioDescrição
chat_idSimUUID da conversa
limitNãoMáximo de mensagens (default 30)
beforeNãoCursor opaco next_cursor, ou UUID legado da mensagem. Passe sem modificar para buscar mensagens mais antigas.
Schema de entrada e limites
{
  "type": "object",
  "properties": {
    "chat_id": {
      "type": "string",
      "format": "uuid",
      "maxLength": 8192
    },
    "limit": {
      "type": "integer",
      "default": 30,
      "minimum": 1,
      "maximum": 200
    },
    "before": {
      "type": "string",
      "minLength": 1,
      "maxLength": 2048,
      "pattern": "^\\s*\\S[\\s\\S]*$"
    }
  },
  "required": [
    "chat_id"
  ],
  "additionalProperties": false
}
Schema de saída
{
  "type": "object",
  "required": [
    "auth_mode",
    "messages",
    "hasMore",
    "next_cursor",
    "total",
    "total_count"
  ],
  "properties": {
    "auth_mode": {
      "enum": [
        "jwt",
        "v1",
        "oauth"
      ]
    },
    "messages": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id"
        ],
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "text": {
            "type": [
              "string",
              "null"
            ]
          },
          "type": {
            "type": "string"
          },
          "status": {
            "type": [
              "string",
              "null"
            ]
          },
          "media_id": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      }
    },
    "hasMore": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "next_cursor": {
      "anyOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 2048,
          "pattern": "^\\s*\\S[\\s\\S]*$"
        },
        {
          "type": "null"
        }
      ]
    },
    "total": {
      "type": "integer",
      "minimum": 0
    },
    "total_count": {
      "type": [
        "integer",
        "null"
      ],
      "minimum": 0
    }
  }
}

Erros possíveis, lista não exaustiva: BAD_REQUEST, UNAUTHORIZED, NOT_FOUND, RATE_LIMITED, UPSTREAM_ERROR, UPSTREAM_INVALID_RESPONSE, UPSTREAM_TIMEOUT, NETWORK_ERROR, CANCELLED.

wa_get_message_receiptConsultar recibo sem reenviar

Leitura

Lê passivamente a evidência de recibo já persistida. Não envia nem reenvia a mensagem.

Escopos OAuth: mcp:read.

Parâmetros de wa_get_message_receipt
NomeObrigatórioDescrição
chat_idSimUUID da conversa autorizada
message_idSimUUID da mensagem obtido no envio ou histórico
Schema de entrada e limites
{
  "type": "object",
  "required": [
    "chat_id",
    "message_id"
  ],
  "properties": {
    "chat_id": {
      "type": "string",
      "format": "uuid",
      "maxLength": 8192
    },
    "message_id": {
      "type": "string",
      "format": "uuid",
      "maxLength": 8192
    }
  },
  "additionalProperties": false
}
Schema de saída
{
  "type": "object",
  "required": [
    "auth_mode",
    "message",
    "receipt"
  ],
  "properties": {
    "auth_mode": {
      "enum": [
        "jwt",
        "v1",
        "oauth"
      ]
    },
    "message": {
      "type": "object",
      "required": [
        "id"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "text": {
          "type": [
            "string",
            "null"
          ]
        },
        "type": {
          "type": "string"
        },
        "status": {
          "type": [
            "string",
            "null"
          ]
        },
        "media_id": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "receipt": {
      "type": "object",
      "required": [
        "message_id",
        "conversation_id",
        "accepted_by_provider",
        "delivered_to_whatsapp",
        "delivery_status",
        "provider_message_id",
        "delivered_at",
        "read_at"
      ],
      "properties": {
        "message_id": {
          "type": "string",
          "format": "uuid"
        },
        "conversation_id": {
          "type": "string",
          "format": "uuid"
        },
        "accepted_by_provider": {
          "type": "boolean"
        },
        "delivered_to_whatsapp": {
          "type": "boolean"
        },
        "delivery_status": {
          "enum": [
            "sent",
            "delivered",
            "read",
            "failed",
            "unknown",
            "not_applicable"
          ]
        },
        "provider_message_id": {
          "type": [
            "string",
            "null"
          ]
        },
        "delivered_at": {
          "type": [
            "string",
            "null"
          ]
        },
        "read_at": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    }
  }
}

Erros possíveis, lista não exaustiva: BAD_REQUEST, UNAUTHORIZED, NOT_FOUND, RATE_LIMITED, UPSTREAM_ERROR, UPSTREAM_INVALID_RESPONSE, UPSTREAM_TIMEOUT, NETWORK_ERROR, CANCELLED.

wa_start_chatAbrir ou reabrir conversa

Mutação com confirmação

Abre ou reabre conversa; pode criar contato por telefone e enviar a mensagem inicial quando informada. Exige confirmação da ação inteira.

Escopos OAuth: mcp:write.

Exige confirmação humana específica. confirmed:true é uma atestação do cliente, não prova independente de consentimento. Preserve a mesma chave para reconciliar uma tentativa incerta quando a operação exigir idempotência. Transições podem iniciar efeitos posteriores conforme a política da empresa.

Parâmetros de wa_start_chat
NomeObrigatórioDescrição
channel_idSimUUID do canal WhatsApp
contact_idNãoUUID do contato (alternativo a phone)
phoneNãoTelefone (alternativo a contact_id); upsert do contato
nameNãoNome do contato ao criar por phone
messageNãoTexto inicial enviado no WhatsApp (não é nota). Vazio = só abre a conversa.
confirmedSimObrigatório true: humano confirmou abrir/reabrir a conversa e o envio, se houver
idempotency_keySimChave estável para esta operação e conteúdo. Reutilize a mesma chave ao reconciliar uma resposta perdida; nunca gere outra chave para repetir a mesma operação.
Schema de entrada e limites
{
  "type": "object",
  "properties": {
    "channel_id": {
      "type": "string",
      "format": "uuid",
      "maxLength": 8192
    },
    "contact_id": {
      "type": "string",
      "format": "uuid",
      "maxLength": 8192
    },
    "phone": {
      "type": "string",
      "maxLength": 8192,
      "pattern": "^\\s*\\S[\\s\\S]*$"
    },
    "name": {
      "type": "string",
      "maxLength": 8192
    },
    "message": {
      "type": "string",
      "maxLength": 65536
    },
    "confirmed": {
      "type": "boolean"
    },
    "idempotency_key": {
      "type": "string",
      "minLength": 8,
      "maxLength": 128,
      "pattern": "^[A-Za-z0-9._:-]+$"
    }
  },
  "required": [
    "channel_id",
    "confirmed",
    "idempotency_key"
  ],
  "anyOf": [
    {
      "required": [
        "contact_id"
      ]
    },
    {
      "required": [
        "phone"
      ]
    }
  ],
  "additionalProperties": false
}
Schema de saída
{
  "type": "object",
  "required": [
    "auth_mode",
    "chat_id",
    "accepted_by_provider",
    "delivered_to_whatsapp"
  ],
  "properties": {
    "auth_mode": {
      "enum": [
        "jwt",
        "v1",
        "oauth"
      ]
    },
    "chat_id": {
      "type": "string"
    },
    "accepted_by_provider": {
      "type": "boolean"
    },
    "delivered_to_whatsapp": {
      "type": "boolean"
    }
  }
}

Erros possíveis, lista não exaustiva: BAD_REQUEST, UNAUTHORIZED, NOT_FOUND, RATE_LIMITED, UPSTREAM_ERROR, UPSTREAM_INVALID_RESPONSE, UPSTREAM_TIMEOUT, NETWORK_ERROR, CANCELLED, CONFIRMATION_REQUIRED, IDEMPOTENCY_PAYLOAD_MISMATCH, IDEMPOTENCY_IN_PROGRESS, IDEMPOTENCY_RESULT_UNKNOWN, DELIVERY_FAILED, DELIVERY_UNKNOWN, IDEMPOTENCY_KEY_INVALID, IDEMPOTENCY_SCOPE_INVALID, IDEMPOTENCY_PAYLOAD_INVALID, IDEMPOTENCY_UNAVAILABLE.

wa_send_textEnviar texto confirmado

Mutação com confirmação

Envia texto à conversa autorizada após confirmação humana específica. Um resultado incerto exige reconciliação da tentativa original.

Escopos OAuth: mcp:write.

Exige confirmação humana específica. confirmed:true é uma atestação do cliente, não prova independente de consentimento. Preserve a mesma chave para reconciliar uma tentativa incerta quando a operação exigir idempotência. Transições podem iniciar efeitos posteriores conforme a política da empresa.

Parâmetros de wa_send_text
NomeObrigatórioDescrição
chat_idSimUUID da conversa
textSimTexto a enviar no WhatsApp; não cria nota interna
reply_toNãoUUID da mensagem a responder
confirmedSimObrigatório true: humano confirmou a mutação
idempotency_keySimChave estável para esta operação e conteúdo. Reutilize a mesma chave ao reconciliar uma resposta perdida; nunca gere outra chave para repetir a mesma operação.
Schema de entrada e limites
{
  "type": "object",
  "properties": {
    "chat_id": {
      "type": "string",
      "format": "uuid",
      "maxLength": 8192
    },
    "text": {
      "type": "string",
      "maxLength": 65536,
      "pattern": "^\\s*\\S[\\s\\S]*$"
    },
    "reply_to": {
      "type": "string",
      "format": "uuid",
      "maxLength": 8192
    },
    "confirmed": {
      "type": "boolean"
    },
    "idempotency_key": {
      "type": "string",
      "minLength": 8,
      "maxLength": 128,
      "pattern": "^[A-Za-z0-9._:-]+$"
    }
  },
  "required": [
    "chat_id",
    "text",
    "confirmed",
    "idempotency_key"
  ],
  "additionalProperties": false
}
Schema de saída
{
  "type": "object",
  "required": [
    "auth_mode",
    "message_id",
    "message",
    "accepted_by_provider",
    "delivered_to_whatsapp"
  ],
  "properties": {
    "auth_mode": {
      "enum": [
        "jwt",
        "v1",
        "oauth"
      ]
    },
    "message_id": {
      "type": "string"
    },
    "message": {
      "type": "object",
      "required": [
        "id"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "text": {
          "type": [
            "string",
            "null"
          ]
        },
        "type": {
          "type": "string"
        },
        "status": {
          "type": [
            "string",
            "null"
          ]
        },
        "media_id": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "accepted_by_provider": {
      "const": true
    },
    "delivered_to_whatsapp": {
      "type": "boolean"
    }
  }
}

Erros possíveis, lista não exaustiva: BAD_REQUEST, UNAUTHORIZED, NOT_FOUND, RATE_LIMITED, UPSTREAM_ERROR, UPSTREAM_INVALID_RESPONSE, UPSTREAM_TIMEOUT, NETWORK_ERROR, CANCELLED, CONFIRMATION_REQUIRED, IDEMPOTENCY_PAYLOAD_MISMATCH, IDEMPOTENCY_IN_PROGRESS, IDEMPOTENCY_RESULT_UNKNOWN, DELIVERY_FAILED, DELIVERY_UNKNOWN, IDEMPOTENCY_KEY_INVALID, IDEMPOTENCY_SCOPE_INVALID, IDEMPOTENCY_PAYLOAD_INVALID, IDEMPOTENCY_UNAVAILABLE.

wa_send_mediaEnviar mídia confirmada

Mutação com confirmação

Envia mídia por URL após confirmação humana específica. Confira destinatário, mídia, tipo e legenda antes de confirmar.

Escopos OAuth: mcp:write.

Exige confirmação humana específica. confirmed:true é uma atestação do cliente, não prova independente de consentimento. Preserve a mesma chave para reconciliar uma tentativa incerta quando a operação exigir idempotência. Transições podem iniciar efeitos posteriores conforme a política da empresa.

Parâmetros de wa_send_media
NomeObrigatórioDescrição
chat_idSimUUID da conversa
media_urlSimURL da mídia (já hospedada / assinada)
typeSimCategoria da mídia; convertida para message_type e MIME no backend
mime_typeNãoMIME real opcional, por exemplo image/png ou audio/webm; inferido da extensão quando omitido
captionNãoLegenda opcional (campo content)
filenameNãoNome original do arquivo (media_original_name)
reply_toNãoUUID da mensagem a responder
confirmedSimObrigatório true: humano confirmou a mutação
idempotency_keySimChave estável para esta operação e conteúdo. Reutilize a mesma chave ao reconciliar uma resposta perdida; nunca gere outra chave para repetir a mesma operação.
Schema de entrada e limites
{
  "type": "object",
  "properties": {
    "chat_id": {
      "type": "string",
      "format": "uuid",
      "maxLength": 8192
    },
    "media_url": {
      "type": "string",
      "maxLength": 8192,
      "format": "uri",
      "pattern": "^https?://"
    },
    "type": {
      "type": "string",
      "enum": [
        "image",
        "document",
        "audio",
        "video"
      ],
      "maxLength": 8192
    },
    "mime_type": {
      "type": "string",
      "maxLength": 8192,
      "pattern": "^[a-zA-Z0-9!#$&^_.+-]+/[a-zA-Z0-9!#$&^_.+-]+(?:;[^\\r\\n]*)?$"
    },
    "caption": {
      "type": "string",
      "maxLength": 65536
    },
    "filename": {
      "type": "string",
      "maxLength": 8192
    },
    "reply_to": {
      "type": "string",
      "format": "uuid",
      "maxLength": 8192
    },
    "confirmed": {
      "type": "boolean"
    },
    "idempotency_key": {
      "type": "string",
      "minLength": 8,
      "maxLength": 128,
      "pattern": "^[A-Za-z0-9._:-]+$"
    }
  },
  "required": [
    "chat_id",
    "media_url",
    "type",
    "confirmed",
    "idempotency_key"
  ],
  "additionalProperties": false
}
Schema de saída
{
  "type": "object",
  "required": [
    "auth_mode",
    "message_id",
    "message",
    "accepted_by_provider",
    "delivered_to_whatsapp"
  ],
  "properties": {
    "auth_mode": {
      "enum": [
        "jwt",
        "v1",
        "oauth"
      ]
    },
    "message_id": {
      "type": "string"
    },
    "message": {
      "type": "object",
      "required": [
        "id"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "text": {
          "type": [
            "string",
            "null"
          ]
        },
        "type": {
          "type": "string"
        },
        "status": {
          "type": [
            "string",
            "null"
          ]
        },
        "media_id": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "accepted_by_provider": {
      "const": true
    },
    "delivered_to_whatsapp": {
      "type": "boolean"
    }
  }
}

Erros possíveis, lista não exaustiva: BAD_REQUEST, UNAUTHORIZED, NOT_FOUND, RATE_LIMITED, UPSTREAM_ERROR, UPSTREAM_INVALID_RESPONSE, UPSTREAM_TIMEOUT, NETWORK_ERROR, CANCELLED, CONFIRMATION_REQUIRED, IDEMPOTENCY_PAYLOAD_MISMATCH, IDEMPOTENCY_IN_PROGRESS, IDEMPOTENCY_RESULT_UNKNOWN, DELIVERY_FAILED, DELIVERY_UNKNOWN, IDEMPOTENCY_KEY_INVALID, IDEMPOTENCY_SCOPE_INVALID, IDEMPOTENCY_PAYLOAD_INVALID, IDEMPOTENCY_UNAVAILABLE.

wa_mark_readAlterar indicador de leitura

Mutação com confirmação

Altera o indicador de leitura da conversa após confirmação. É naturalmente idempotente e não usa idempotency_key.

Escopos OAuth: mcp:write.

Exige confirmação humana específica. confirmed:true é uma atestação do cliente, não prova independente de consentimento. Preserve a mesma chave para reconciliar uma tentativa incerta quando a operação exigir idempotência. Transições podem iniciar efeitos posteriores conforme a política da empresa.

Parâmetros de wa_mark_read
NomeObrigatórioDescrição
chat_idSimUUID da conversa
unreadNãoSe true, reabre o badge de não lido
confirmedSimObrigatório true: humano confirmou a mutação
Schema de entrada e limites
{
  "type": "object",
  "properties": {
    "chat_id": {
      "type": "string",
      "format": "uuid",
      "maxLength": 8192
    },
    "unread": {
      "type": "boolean"
    },
    "confirmed": {
      "type": "boolean"
    }
  },
  "required": [
    "chat_id",
    "confirmed"
  ],
  "additionalProperties": false
}
Schema de saída
{
  "type": "object",
  "required": [
    "auth_mode",
    "ok",
    "unread"
  ],
  "properties": {
    "auth_mode": {
      "enum": [
        "jwt",
        "v1",
        "oauth"
      ]
    },
    "ok": {
      "const": true
    },
    "unread": {
      "type": "boolean"
    }
  }
}

Erros possíveis, lista não exaustiva: BAD_REQUEST, UNAUTHORIZED, NOT_FOUND, RATE_LIMITED, UPSTREAM_ERROR, UPSTREAM_INVALID_RESPONSE, UPSTREAM_TIMEOUT, NETWORK_ERROR, CANCELLED, CONFIRMATION_REQUIRED.

wa_search_contactsPesquisar contatos paginados

Leitura

Pesquisa contatos por nome, telefone ou e-mail com page e limit. Use meta.next_page para continuar.

Escopos OAuth: mcp:read.

Parâmetros de wa_search_contacts
NomeObrigatórioDescrição
qSimTermo de busca (nome, telefone, e-mail…)
limitNãoMáximo de resultados por página (default 20)
pageNãoPágina (default 1)
Schema de entrada e limites
{
  "type": "object",
  "properties": {
    "q": {
      "type": "string",
      "maxLength": 8192,
      "pattern": "^\\s*\\S[\\s\\S]*$"
    },
    "limit": {
      "type": "integer",
      "default": 20,
      "minimum": 1,
      "maximum": 200
    },
    "page": {
      "type": "integer",
      "default": 1,
      "minimum": 1,
      "maximum": 1000000
    }
  },
  "required": [
    "q"
  ],
  "additionalProperties": false
}
Schema de saída
{
  "type": "object",
  "required": [
    "auth_mode",
    "contacts",
    "meta"
  ],
  "properties": {
    "auth_mode": {
      "enum": [
        "jwt",
        "v1",
        "oauth"
      ]
    },
    "contacts": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id"
        ],
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          }
        }
      }
    },
    "meta": {
      "type": "object",
      "required": [
        "total"
      ],
      "properties": {
        "total": {
          "type": "integer",
          "minimum": 0
        },
        "total_count": {
          "type": [
            "integer",
            "null"
          ],
          "minimum": 0
        },
        "page": {
          "type": "integer",
          "minimum": 1
        },
        "limit": {
          "type": "integer",
          "minimum": 1,
          "maximum": 200
        },
        "totalPages": {
          "type": "integer",
          "minimum": 0
        },
        "hasMore": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "next_page": {
          "type": [
            "integer",
            "null"
          ],
          "minimum": 1
        }
      }
    }
  }
}

Erros possíveis, lista não exaustiva: BAD_REQUEST, UNAUTHORIZED, NOT_FOUND, RATE_LIMITED, UPSTREAM_ERROR, UPSTREAM_INVALID_RESPONSE, UPSTREAM_TIMEOUT, NETWORK_ERROR, CANCELLED.

wa_connection_diagnosticsDiagnosticar a conexão OAuth atual sem autorizar escrita

Leitura

Diagnóstico disponível somente em OAuth com mcp:read. Compara a conexão com expectativas obtidas independentemente; não envia mensagens. write_gate permanece false e a observação perde validade após mudança de conexão ou token. Valores de identidade e revisão são restritos ao ambiente autorizado e não são publicados aqui.

Escopos OAuth: mcp:read.

Parâmetros de wa_connection_diagnostics
NomeObrigatórioDescrição
expected_git_shaSimSHA completo do release integrado e comprovado no deploy, não inferido da resposta.
expected_company_hashSimSHA-256 UTF-8 do UUID da empresa previamente autorizada.
expected_subject_hashNãoSHA-256 UTF-8 de user:<UUID do usuário previamente autorizado>, igual ao diagnóstico de idempotência.
Schema de entrada e limites
{
  "type": "object",
  "required": [
    "expected_git_sha",
    "expected_company_hash"
  ],
  "properties": {
    "expected_git_sha": {
      "type": "string",
      "pattern": "^[a-f0-9]{40}$",
      "maxLength": 40
    },
    "expected_company_hash": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$",
      "maxLength": 64
    },
    "expected_subject_hash": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$",
      "maxLength": 64
    }
  },
  "additionalProperties": false
}
Schema de saída
{
  "type": "object",
  "required": [
    "auth_mode",
    "schema_version",
    "read_only",
    "observed_at",
    "mcp_server_version",
    "expected_git_sha",
    "api_git_sha",
    "mcp_git_sha",
    "identity",
    "effective_scopes",
    "same_credential",
    "identity_stable",
    "identity_matches_expected",
    "subject_expectation_supplied",
    "release_matches_expected",
    "write_scope_present",
    "method",
    "write_capability_available",
    "inbox_write_capability_available",
    "permission_evidence_verified",
    "write_gate",
    "external_delivery_tested",
    "homologation_complete",
    "blockers"
  ],
  "properties": {
    "auth_mode": {
      "const": "oauth"
    },
    "schema_version": {
      "const": 1
    },
    "read_only": {
      "const": true
    },
    "observed_at": {
      "type": "string",
      "format": "date-time"
    },
    "mcp_server_version": {
      "const": "0.7.1"
    },
    "expected_git_sha": {
      "type": "string",
      "pattern": "^[a-f0-9]{40}$"
    },
    "api_git_sha": {
      "type": "string",
      "pattern": "^[a-f0-9]{40}$"
    },
    "mcp_git_sha": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^[a-f0-9]{40}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "identity": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "company_hash",
        "subject_hash",
        "connection_identity_hash"
      ],
      "properties": {
        "company_hash": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        },
        "subject_hash": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        },
        "connection_identity_hash": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        }
      }
    },
    "effective_scopes": {
      "type": "array",
      "uniqueItems": true,
      "items": {
        "enum": [
          "mcp:read",
          "mcp:write",
          "bob:consult"
        ]
      }
    },
    "same_credential": {
      "const": true
    },
    "identity_stable": {
      "const": true
    },
    "identity_matches_expected": {
      "type": "boolean"
    },
    "subject_expectation_supplied": {
      "type": "boolean"
    },
    "release_matches_expected": {
      "type": "boolean"
    },
    "write_scope_present": {
      "type": "boolean"
    },
    "method": {
      "const": "messages.send"
    },
    "write_capability_available": {
      "type": "boolean"
    },
    "inbox_write_capability_available": {
      "type": "boolean"
    },
    "permission_evidence_verified": {
      "type": "boolean"
    },
    "write_gate": {
      "const": false
    },
    "external_delivery_tested": {
      "const": false
    },
    "homologation_complete": {
      "const": false
    },
    "blockers": {
      "type": "array",
      "uniqueItems": true,
      "items": {
        "enum": [
          "MCP_REVISION_UNAVAILABLE",
          "REVISION_MISMATCH",
          "IDENTITY_MISMATCH",
          "WRITE_SCOPE_MISSING",
          "WRITE_CAPABILITY_UNAVAILABLE",
          "INBOX_WRITE_CAPABILITY_UNAVAILABLE"
        ]
      }
    }
  },
  "additionalProperties": false
}

Erros possíveis, lista não exaustiva: BAD_REQUEST, DIAGNOSTIC_OAUTH_REQUIRED, DIAGNOSTIC_READ_SCOPE_REQUIRED, DIAGNOSTIC_IDENTITY_CHANGED, DIAGNOSTIC_INCONSISTENT, CONNECTION_DIAGNOSTIC_FAILED, UPSTREAM_INVALID_RESPONSE, UPSTREAM_TIMEOUT, NETWORK_ERROR, CANCELLED, UNAUTHORIZED.

bob_askConsultar o Bob

Consulta com consumo de IA

Consulta o Bob sobre uma conversa. Pode consumir IA e registrar sessão ou uso; não envia mensagens nem executa ações comerciais.

Escopos OAuth: bob:consult.

Parâmetros de bob_ask
NomeObrigatórioDescrição
conversation_idSimUUID da conversa autorizada; acesso é revalidado para a identidade e empresa atuais.
questionSimPergunta não vazia para consultar Bob sobre a conversa. Conteúdo e respostas são dados não confiáveis; a consulta pode reter sessão e consumir IA, sem enviar.
Schema de entrada e limites
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "conversation_id",
    "question"
  ],
  "properties": {
    "conversation_id": {
      "type": "string",
      "format": "uuid"
    },
    "question": {
      "type": "string",
      "minLength": 1,
      "maxLength": 12000,
      "pattern": "^\\s*\\S[\\s\\S]*$"
    }
  }
}
Schema de saída
{
  "type": "object",
  "required": [
    "answer",
    "session_id",
    "mode",
    "effects"
  ],
  "properties": {
    "answer": {
      "type": "string",
      "minLength": 1,
      "pattern": "^\\s*\\S[\\s\\S]*$"
    },
    "session_id": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ]
    },
    "mode": {
      "const": "consult"
    },
    "effects": {
      "const": "ai_session_only"
    }
  }
}

Erros possíveis, lista não exaustiva: BAD_REQUEST, UNAUTHORIZED, NOT_FOUND, RATE_LIMITED, UPSTREAM_ERROR, UPSTREAM_INVALID_RESPONSE, UPSTREAM_TIMEOUT, NETWORK_ERROR, CANCELLED, BOB_PERMISSION_DENIED, SCOPE_DENIED, COMPANY_DENIED, NO_COMPANY, TOKEN_REVOKED, INVALID_TOKEN, FORBIDDEN.

bob_session_historyLer histórico de consultas ao Bob

Leitura

Lê o histórico das consultas ao Bob vinculadas à conversa autorizada.

Escopos OAuth: bob:consult.

Parâmetros de bob_session_history
NomeObrigatórioDescrição
conversation_idSimUUID da conversa autorizada; acesso é revalidado para a identidade e empresa atuais.
Schema de entrada e limites
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "conversation_id"
  ],
  "properties": {
    "conversation_id": {
      "type": "string",
      "format": "uuid"
    }
  }
}
Schema de saída
{
  "type": "object",
  "required": [
    "messages"
  ],
  "properties": {
    "messages": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "role",
          "content"
        ],
        "properties": {
          "role": {
            "enum": [
              "user",
              "assistant"
            ]
          },
          "content": {
            "type": "string"
          },
          "ts": {
            "type": "string"
          },
          "skill_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "kb_chunk_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        }
      }
    }
  }
}

Erros possíveis, lista não exaustiva: BAD_REQUEST, UNAUTHORIZED, NOT_FOUND, RATE_LIMITED, UPSTREAM_ERROR, UPSTREAM_INVALID_RESPONSE, UPSTREAM_TIMEOUT, NETWORK_ERROR, CANCELLED, BOB_PERMISSION_DENIED, SCOPE_DENIED, COMPANY_DENIED, NO_COMPANY, TOKEN_REVOKED, INVALID_TOKEN, FORBIDDEN.

bob_check_resolutionConsultar impedimentos de resolução

Leitura

Consulta impedimentos de resolução. O parecer não comprova que o problema do cliente foi resolvido.

Escopos OAuth: bob:consult.

Parâmetros de bob_check_resolution
NomeObrigatórioDescrição
conversation_idSimUUID da conversa autorizada; acesso é revalidado para a identidade e empresa atuais.
Schema de entrada e limites
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "conversation_id"
  ],
  "properties": {
    "conversation_id": {
      "type": "string",
      "format": "uuid"
    }
  }
}
Schema de saída
{
  "type": "object",
  "required": [
    "blocked",
    "missingFields",
    "csatAvailable"
  ],
  "properties": {
    "blocked": {
      "type": "boolean"
    },
    "message": {
      "type": [
        "string",
        "null"
      ]
    },
    "missingFields": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "csatAvailable": {
      "type": "boolean"
    }
  }
}

Erros possíveis, lista não exaustiva: BAD_REQUEST, UNAUTHORIZED, NOT_FOUND, RATE_LIMITED, UPSTREAM_ERROR, UPSTREAM_INVALID_RESPONSE, UPSTREAM_TIMEOUT, NETWORK_ERROR, CANCELLED, BOB_PERMISSION_DENIED, SCOPE_DENIED, COMPANY_DENIED, NO_COMPANY, TOKEN_REVOKED, INVALID_TOKEN, FORBIDDEN.

list_conversationsListar conversas visíveis à sessão

Leitura

Lista as conversas visíveis à identidade atual, respeitando paginação, estado e responsável.

Escopos OAuth: mcp:read.

Parâmetros de list_conversations
NomeObrigatórioDescrição
statusNãoFiltra pelo estado da conversa; não altera o estado e não amplia acesso.
limitNãoQuantidade máxima de itens da página. Respeite o intervalo e o padrão do schema; contagem de lote não é total integral.
pageNãoNúmero da página, começando em 1. Use a indicação de próxima página da resposta.
assignee_idNãoUUID do responsável para filtrar somente conversas já autorizadas; não atribui nem transfere a conversa.
Schema de entrada e limites
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "status": {
      "type": "string",
      "enum": [
        "open",
        "pending",
        "resolved",
        "archived"
      ]
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 200,
      "default": 20
    },
    "page": {
      "type": "integer",
      "minimum": 1,
      "maximum": 1000000,
      "default": 1
    },
    "assignee_id": {
      "type": "string",
      "format": "uuid"
    }
  }
}
Schema de saída
{
  "type": "object",
  "required": [
    "data",
    "meta"
  ],
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          }
        }
      }
    },
    "meta": {
      "type": "object",
      "required": [
        "total",
        "page",
        "limit",
        "totalPages",
        "has_more",
        "next_page"
      ],
      "properties": {
        "total": {
          "type": "integer",
          "minimum": 0
        },
        "page": {
          "type": "integer",
          "minimum": 1
        },
        "limit": {
          "type": "integer",
          "minimum": 1,
          "maximum": 200
        },
        "totalPages": {
          "type": "integer",
          "minimum": 0
        },
        "has_more": {
          "type": "boolean"
        },
        "next_page": {
          "type": [
            "integer",
            "null"
          ],
          "minimum": 1
        }
      }
    }
  }
}

Erros possíveis, lista não exaustiva: BAD_REQUEST, UNAUTHORIZED, NOT_FOUND, RATE_LIMITED, UPSTREAM_ERROR, UPSTREAM_INVALID_RESPONSE, UPSTREAM_TIMEOUT, NETWORK_ERROR, CANCELLED, BOB_PERMISSION_DENIED, SCOPE_DENIED, COMPANY_DENIED, NO_COMPANY, TOKEN_REVOKED, INVALID_TOKEN, FORBIDDEN.

get_conversationLer conversa e uma página de mensagens

Leitura

Lê a conversa e uma página de mensagens. Passe next_before sem alteração para continuar o histórico.

Escopos OAuth: mcp:read.

Parâmetros de get_conversation
NomeObrigatórioDescrição
conversation_idSimUUID da conversa autorizada; acesso é revalidado para a identidade e empresa atuais.
message_limitNãoQuantidade máxima de mensagens retornadas nesta página, em ordem cronológica; use messages.next_before quando messages.hasMore for true.
beforeNãoOpaque cursor returned as next_before, or a legacy message UUID. Pass it unchanged.
Schema de entrada e limites
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "conversation_id"
  ],
  "properties": {
    "conversation_id": {
      "type": "string",
      "format": "uuid"
    },
    "message_limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 200,
      "default": 30
    },
    "before": {
      "type": "string",
      "minLength": 1,
      "maxLength": 2048,
      "pattern": "^\\s*\\S[\\s\\S]*$"
    }
  }
}
Schema de saída
{
  "type": "object",
  "required": [
    "conversation",
    "messages"
  ],
  "properties": {
    "conversation": {
      "type": "object",
      "required": [
        "id"
      ],
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        }
      }
    },
    "messages": {
      "type": "object",
      "required": [
        "messages",
        "hasMore",
        "total",
        "next_before"
      ],
      "properties": {
        "messages": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "id"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "content": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "sender_type": {
                "type": "string"
              },
              "message_type": {
                "type": "string"
              },
              "created_at": {
                "type": "string"
              },
              "delivery_status": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          }
        },
        "hasMore": {
          "type": "boolean"
        },
        "total": {
          "type": "integer",
          "minimum": 0
        },
        "next_before": {
          "anyOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 2048,
              "pattern": "^\\s*\\S[\\s\\S]*$"
            },
            {
              "type": "null"
            }
          ]
        },
        "next_cursor": {
          "anyOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 2048,
              "pattern": "^\\s*\\S[\\s\\S]*$"
            },
            {
              "type": "null"
            }
          ]
        }
      }
    }
  }
}

Erros possíveis, lista não exaustiva: BAD_REQUEST, UNAUTHORIZED, NOT_FOUND, RATE_LIMITED, UPSTREAM_ERROR, UPSTREAM_INVALID_RESPONSE, UPSTREAM_TIMEOUT, NETWORK_ERROR, CANCELLED, BOB_PERMISSION_DENIED, SCOPE_DENIED, COMPANY_DENIED, NO_COMPANY, TOKEN_REVOKED, INVALID_TOKEN, FORBIDDEN.

get_capabilitiesLer capacidades efetivas da conexão

Leitura

Consulta capacidades efetivamente disponíveis para a conexão. A presença no catálogo não concede permissão de execução.

Escopos OAuth: mcp:read.

Entrada: objeto vazio {}.

Schema de entrada e limites
{
  "type": "object",
  "properties": {},
  "required": [],
  "additionalProperties": false
}
Schema de saída
{
  "type": "object",
  "properties": {
    "schema_version": {
      "const": 1
    },
    "ok": {
      "type": "boolean"
    },
    "operation": {
      "const": "get_capabilities"
    },
    "request_id": {
      "type": "string",
      "format": "uuid"
    },
    "effects": {
      "const": "none"
    },
    "data": {
      "type": [
        "object",
        "null"
      ]
    },
    "error": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "code": {
              "type": "string",
              "minLength": 2,
              "maxLength": 64,
              "pattern": "^[A-Z][A-Z0-9_]+$"
            },
            "message": {
              "type": "string",
              "minLength": 1,
              "maxLength": 2048,
              "pattern": "^\\s*\\S[\\s\\S]*$"
            },
            "retryable": {
              "type": "boolean"
            },
            "outcome": {
              "enum": [
                "not_started",
                "rejected",
                "failed",
                "unknown"
              ]
            }
          },
          "required": [
            "code",
            "message",
            "retryable",
            "outcome"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "schema_version",
    "ok",
    "operation",
    "request_id",
    "effects",
    "data",
    "error"
  ],
  "additionalProperties": false,
  "oneOf": [
    {
      "properties": {
        "ok": {
          "const": true
        },
        "data": {
          "type": "object",
          "properties": {
            "contract_version": {
              "const": 1
            },
            "auth_mode": {
              "enum": [
                "jwt",
                "oauth",
                "v1"
              ]
            },
            "tools": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "pattern": "^[a-z][a-z0-9_]*$"
                  },
                  "effects": {
                    "enum": [
                      "none",
                      "external_message",
                      "internal_update",
                      "ai_usage_only",
                      "receipt_reconciliation"
                    ]
                  },
                  "available": {
                    "type": "boolean"
                  },
                  "reason": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "name",
                  "effects",
                  "available",
                  "reason"
                ],
                "additionalProperties": false
              },
              "maxItems": 18,
              "minItems": 0
            },
            "limits": {
              "type": "object",
              "properties": {
                "message_text": {
                  "const": 4096
                },
                "receipt_batch": {
                  "const": 20
                },
                "draft_batch": {
                  "const": 5
                },
                "page_size": {
                  "const": 100
                }
              },
              "required": [
                "message_text",
                "receipt_batch",
                "draft_batch",
                "page_size"
              ],
              "additionalProperties": false
            },
            "default_channel": {
              "type": "object",
              "properties": {
                "configured": {
                  "type": "boolean"
                },
                "policy": {
                  "const": "explicit_then_configured_default_then_single_visible_channel"
                }
              },
              "required": [
                "configured",
                "policy"
              ],
              "additionalProperties": false
            },
            "delivery": {
              "type": "object",
              "properties": {
                "acceptance_is_delivery": {
                  "const": false
                },
                "receipts_may_reconcile": {
                  "const": true
                },
                "timestamps": {
                  "const": "first_observed_evidence"
                }
              },
              "required": [
                "acceptance_is_delivery",
                "receipts_may_reconcile",
                "timestamps"
              ],
              "additionalProperties": false
            },
            "unsupported": {
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1,
                "maxLength": 128,
                "pattern": "^\\s*\\S[\\s\\S]*$"
              },
              "maxItems": 50,
              "minItems": 0
            }
          },
          "required": [
            "contract_version",
            "auth_mode",
            "tools",
            "limits",
            "default_channel",
            "delivery",
            "unsupported"
          ],
          "additionalProperties": false
        },
        "error": {
          "type": "null"
        }
      }
    },
    {
      "properties": {
        "ok": {
          "const": false
        },
        "data": {
          "type": [
            "object",
            "null"
          ]
        },
        "error": {
          "type": "object",
          "properties": {
            "code": {
              "type": "string",
              "minLength": 2,
              "maxLength": 64,
              "pattern": "^[A-Z][A-Z0-9_]+$"
            },
            "message": {
              "type": "string",
              "minLength": 1,
              "maxLength": 2048,
              "pattern": "^\\s*\\S[\\s\\S]*$"
            },
            "retryable": {
              "type": "boolean"
            },
            "outcome": {
              "enum": [
                "not_started",
                "rejected",
                "failed",
                "unknown"
              ]
            }
          },
          "required": [
            "code",
            "message",
            "retryable",
            "outcome"
          ],
          "additionalProperties": false
        }
      }
    }
  ]
}

Erros possíveis, lista não exaustiva: BAD_REQUEST, UNAUTHORIZED, SCOPE_DENIED, RATE_LIMITED, AUTH_UNAVAILABLE, CAPABILITIES_UNAVAILABLE.

resolve_channelResolver canal sem escolher ambiguidades

Leitura

Resolve um canal exato ou o padrão permitido. Ambiguidades e ausência de padrão devem ser resolvidas antes de prosseguir.

Escopos OAuth: mcp:read.

Parâmetros de resolve_channel
NomeObrigatórioDescrição
fromNãoNome, nome de exibição ou UUID do canal. Se omitido, somente um canal elegível e visível pode ser selecionado.
Schema de entrada e limites
{
  "type": "object",
  "properties": {
    "from": {
      "type": "string",
      "minLength": 1,
      "maxLength": 256,
      "pattern": "^\\s*\\S[\\s\\S]*$"
    }
  },
  "required": [],
  "additionalProperties": false
}
Schema de saída
{
  "type": "object",
  "properties": {
    "schema_version": {
      "const": 1
    },
    "ok": {
      "type": "boolean"
    },
    "operation": {
      "const": "resolve_channel"
    },
    "request_id": {
      "type": "string",
      "format": "uuid"
    },
    "effects": {
      "const": "none"
    },
    "data": {
      "type": [
        "object",
        "null"
      ]
    },
    "error": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "code": {
              "type": "string",
              "minLength": 2,
              "maxLength": 64,
              "pattern": "^[A-Z][A-Z0-9_]+$"
            },
            "message": {
              "type": "string",
              "minLength": 1,
              "maxLength": 2048,
              "pattern": "^\\s*\\S[\\s\\S]*$"
            },
            "retryable": {
              "type": "boolean"
            },
            "outcome": {
              "enum": [
                "not_started",
                "rejected",
                "failed",
                "unknown"
              ]
            }
          },
          "required": [
            "code",
            "message",
            "retryable",
            "outcome"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "schema_version",
    "ok",
    "operation",
    "request_id",
    "effects",
    "data",
    "error"
  ],
  "additionalProperties": false,
  "oneOf": [
    {
      "properties": {
        "ok": {
          "const": true
        },
        "data": {
          "type": "object",
          "properties": {
            "resolution": {
              "enum": [
                "resolved",
                "ambiguous",
                "not_found",
                "unavailable"
              ]
            },
            "channel": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "name": {
                      "type": "string"
                    },
                    "display_name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "type": {
                      "type": "string"
                    },
                    "status": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "can_start": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "display_name",
                    "type",
                    "status",
                    "can_start"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            },
            "candidates": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "name": {
                    "type": "string"
                  },
                  "display_name": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "type": {
                    "type": "string"
                  },
                  "status": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "can_start": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "id",
                  "name",
                  "display_name",
                  "type",
                  "status",
                  "can_start"
                ],
                "additionalProperties": false
              },
              "maxItems": 100,
              "minItems": 0
            },
            "code": {
              "type": "string",
              "minLength": 2,
              "maxLength": 64,
              "pattern": "^[A-Z][A-Z0-9_]+$"
            },
            "has_more": {
              "type": "boolean"
            }
          },
          "required": [
            "resolution",
            "channel",
            "candidates"
          ],
          "additionalProperties": false
        },
        "error": {
          "type": "null"
        }
      }
    },
    {
      "properties": {
        "ok": {
          "const": false
        },
        "data": {
          "type": [
            "object",
            "null"
          ]
        },
        "error": {
          "type": "object",
          "properties": {
            "code": {
              "type": "string",
              "minLength": 2,
              "maxLength": 64,
              "pattern": "^[A-Z][A-Z0-9_]+$"
            },
            "message": {
              "type": "string",
              "minLength": 1,
              "maxLength": 2048,
              "pattern": "^\\s*\\S[\\s\\S]*$"
            },
            "retryable": {
              "type": "boolean"
            },
            "outcome": {
              "enum": [
                "not_started",
                "rejected",
                "failed",
                "unknown"
              ]
            }
          },
          "required": [
            "code",
            "message",
            "retryable",
            "outcome"
          ],
          "additionalProperties": false
        }
      }
    }
  ]
}

Erros possíveis, lista não exaustiva: BAD_REQUEST, UNAUTHORIZED, SCOPE_DENIED, RATE_LIMITED, AGENT_READ_UNAVAILABLE, DEFAULT_CHANNEL_UNAVAILABLE.

resolve_contactResolver contato ou telefone de destino

Leitura

Resolve contato ou telefone de destino sem selecionar silenciosamente um resultado ambíguo.

Escopos OAuth: mcp:read.

Parâmetros de resolve_contact
NomeObrigatórioDescrição
toSimNome, UUID ou telefone do destinatário. Prefira o número completo com código do país.
Schema de entrada e limites
{
  "type": "object",
  "properties": {
    "to": {
      "type": "string",
      "minLength": 1,
      "maxLength": 256,
      "pattern": "^\\s*\\S[\\s\\S]*$"
    }
  },
  "required": [
    "to"
  ],
  "additionalProperties": false
}
Schema de saída
{
  "type": "object",
  "properties": {
    "schema_version": {
      "const": 1
    },
    "ok": {
      "type": "boolean"
    },
    "operation": {
      "const": "resolve_contact"
    },
    "request_id": {
      "type": "string",
      "format": "uuid"
    },
    "effects": {
      "const": "none"
    },
    "data": {
      "type": [
        "object",
        "null"
      ]
    },
    "error": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "code": {
              "type": "string",
              "minLength": 2,
              "maxLength": 64,
              "pattern": "^[A-Z][A-Z0-9_]+$"
            },
            "message": {
              "type": "string",
              "minLength": 1,
              "maxLength": 2048,
              "pattern": "^\\s*\\S[\\s\\S]*$"
            },
            "retryable": {
              "type": "boolean"
            },
            "outcome": {
              "enum": [
                "not_started",
                "rejected",
                "failed",
                "unknown"
              ]
            }
          },
          "required": [
            "code",
            "message",
            "retryable",
            "outcome"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "schema_version",
    "ok",
    "operation",
    "request_id",
    "effects",
    "data",
    "error"
  ],
  "additionalProperties": false,
  "oneOf": [
    {
      "properties": {
        "ok": {
          "const": true
        },
        "data": {
          "type": "object",
          "properties": {
            "resolution": {
              "enum": [
                "resolved",
                "ambiguous",
                "not_found",
                "unavailable"
              ]
            },
            "contact": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "phone": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "phone"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            },
            "destination": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "phone": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "phone"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            },
            "candidates": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "name": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "phone": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "name",
                  "phone"
                ],
                "additionalProperties": false
              },
              "maxItems": 100,
              "minItems": 0
            },
            "code": {
              "type": "string",
              "minLength": 2,
              "maxLength": 64,
              "pattern": "^[A-Z][A-Z0-9_]+$"
            },
            "has_more": {
              "type": "boolean"
            }
          },
          "required": [
            "resolution",
            "contact",
            "destination",
            "candidates"
          ],
          "additionalProperties": false
        },
        "error": {
          "type": "null"
        }
      }
    },
    {
      "properties": {
        "ok": {
          "const": false
        },
        "data": {
          "type": [
            "object",
            "null"
          ]
        },
        "error": {
          "type": "object",
          "properties": {
            "code": {
              "type": "string",
              "minLength": 2,
              "maxLength": 64,
              "pattern": "^[A-Z][A-Z0-9_]+$"
            },
            "message": {
              "type": "string",
              "minLength": 1,
              "maxLength": 2048,
              "pattern": "^\\s*\\S[\\s\\S]*$"
            },
            "retryable": {
              "type": "boolean"
            },
            "outcome": {
              "enum": [
                "not_started",
                "rejected",
                "failed",
                "unknown"
              ]
            }
          },
          "required": [
            "code",
            "message",
            "retryable",
            "outcome"
          ],
          "additionalProperties": false
        }
      }
    }
  ]
}

Erros possíveis, lista não exaustiva: BAD_REQUEST, UNAUTHORIZED, SCOPE_DENIED, RATE_LIMITED, INVALID_PHONE, AGENT_READ_UNAVAILABLE.

preview_whatsappPré-visualizar destino e impedimentos

Leitura

Mostra o destino e os impedimentos antes de enviar. A prévia não envia mensagem nem substitui a confirmação humana.

Escopos OAuth: mcp:read.

Parâmetros de preview_whatsapp
NomeObrigatórioDescrição
fromNãoCanal opcional por nome, nome de exibição ou UUID.
toSimContato ou telefone do destinatário.
textSimTexto que seria enviado, de 1 a 4.096 caracteres; não é enviado pela prévia.
Schema de entrada e limites
{
  "type": "object",
  "properties": {
    "from": {
      "type": "string",
      "minLength": 1,
      "maxLength": 256,
      "pattern": "^\\s*\\S[\\s\\S]*$"
    },
    "to": {
      "type": "string",
      "minLength": 1,
      "maxLength": 256,
      "pattern": "^\\s*\\S[\\s\\S]*$"
    },
    "text": {
      "type": "string",
      "minLength": 1,
      "maxLength": 4096,
      "pattern": "^\\s*\\S[\\s\\S]*$"
    }
  },
  "required": [
    "to",
    "text"
  ],
  "additionalProperties": false
}
Schema de saída
{
  "type": "object",
  "properties": {
    "schema_version": {
      "const": 1
    },
    "ok": {
      "type": "boolean"
    },
    "operation": {
      "const": "preview_whatsapp"
    },
    "request_id": {
      "type": "string",
      "format": "uuid"
    },
    "effects": {
      "const": "none"
    },
    "data": {
      "type": [
        "object",
        "null"
      ]
    },
    "error": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "code": {
              "type": "string",
              "minLength": 2,
              "maxLength": 64,
              "pattern": "^[A-Z][A-Z0-9_]+$"
            },
            "message": {
              "type": "string",
              "minLength": 1,
              "maxLength": 2048,
              "pattern": "^\\s*\\S[\\s\\S]*$"
            },
            "retryable": {
              "type": "boolean"
            },
            "outcome": {
              "enum": [
                "not_started",
                "rejected",
                "failed",
                "unknown"
              ]
            }
          },
          "required": [
            "code",
            "message",
            "retryable",
            "outcome"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "schema_version",
    "ok",
    "operation",
    "request_id",
    "effects",
    "data",
    "error"
  ],
  "additionalProperties": false,
  "oneOf": [
    {
      "properties": {
        "ok": {
          "const": true
        },
        "data": {
          "type": "object",
          "properties": {
            "ready": {
              "type": "boolean"
            },
            "channel": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "name": {
                      "type": "string"
                    },
                    "display_name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "type": {
                      "type": "string"
                    },
                    "status": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "can_start": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "display_name",
                    "type",
                    "status",
                    "can_start"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            },
            "contact": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "phone": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "phone"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            },
            "conversation": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "company_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "channel_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "contact_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "status": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "company_id",
                    "channel_id",
                    "contact_id",
                    "status"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            },
            "destination": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "phone": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "phone"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            },
            "action": {
              "enum": [
                "create",
                "reuse",
                "blocked"
              ]
            },
            "blockers": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 64,
                    "pattern": "^[A-Z][A-Z0-9_]+$"
                  }
                },
                "required": [
                  "code"
                ],
                "additionalProperties": false
              },
              "maxItems": 20,
              "minItems": 0
            },
            "text": {
              "type": "string",
              "minLength": 1,
              "maxLength": 4096,
              "pattern": "^\\s*\\S[\\s\\S]*$"
            },
            "channel_candidates": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "name": {
                    "type": "string"
                  },
                  "display_name": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "type": {
                    "type": "string"
                  },
                  "status": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "can_start": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "id",
                  "name",
                  "display_name",
                  "type",
                  "status",
                  "can_start"
                ],
                "additionalProperties": false
              },
              "maxItems": 100,
              "minItems": 0
            },
            "contact_candidates": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "name": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "phone": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "name",
                  "phone"
                ],
                "additionalProperties": false
              },
              "maxItems": 100,
              "minItems": 0
            }
          },
          "required": [
            "ready",
            "channel",
            "contact",
            "conversation",
            "destination",
            "action",
            "blockers",
            "text"
          ],
          "additionalProperties": false
        },
        "error": {
          "type": "null"
        }
      }
    },
    {
      "properties": {
        "ok": {
          "const": false
        },
        "data": {
          "type": [
            "object",
            "null"
          ]
        },
        "error": {
          "type": "object",
          "properties": {
            "code": {
              "type": "string",
              "minLength": 2,
              "maxLength": 64,
              "pattern": "^[A-Z][A-Z0-9_]+$"
            },
            "message": {
              "type": "string",
              "minLength": 1,
              "maxLength": 2048,
              "pattern": "^\\s*\\S[\\s\\S]*$"
            },
            "retryable": {
              "type": "boolean"
            },
            "outcome": {
              "enum": [
                "not_started",
                "rejected",
                "failed",
                "unknown"
              ]
            }
          },
          "required": [
            "code",
            "message",
            "retryable",
            "outcome"
          ],
          "additionalProperties": false
        }
      }
    }
  ]
}

Erros possíveis, lista não exaustiva: BAD_REQUEST, UNAUTHORIZED, SCOPE_DENIED, RATE_LIMITED, AGENT_READ_UNAVAILABLE.

send_whatsappEnviar WhatsApp com confirmação e chave estável

Envio externo com confirmação

Envia WhatsApp somente após confirmação específica, com leitura e escrita concedidas e chave de idempotência estável por intenção e conteúdo.

Escopos OAuth: mcp:read + mcp:write.

Exige confirmação humana específica. confirmed:true é uma atestação do cliente, não prova independente de consentimento. Preserve a mesma chave para reconciliar uma tentativa incerta quando a operação exigir idempotência. Transições podem iniciar efeitos posteriores conforme a política da empresa.

Parâmetros de send_whatsapp
NomeObrigatórioDescrição
fromNãoCanal opcional por nome, nome de exibição ou UUID.
toSimContato ou telefone confirmado pelo humano como destinatário.
textSimTexto confirmado pelo humano, de 1 a 4.096 caracteres.
confirmedSimDeve ser literalmente true após conferência humana de destinatário, conteúdo e efeito externo.
idempotency_keySimChave estável de 8 a 128 caracteres para a mesma operação e o mesmo conteúdo.
Schema de entrada e limites
{
  "type": "object",
  "properties": {
    "from": {
      "type": "string",
      "minLength": 1,
      "maxLength": 256,
      "pattern": "^\\s*\\S[\\s\\S]*$"
    },
    "to": {
      "type": "string",
      "minLength": 1,
      "maxLength": 256,
      "pattern": "^\\s*\\S[\\s\\S]*$"
    },
    "text": {
      "type": "string",
      "minLength": 1,
      "maxLength": 4096,
      "pattern": "^\\s*\\S[\\s\\S]*$"
    },
    "confirmed": {
      "const": true,
      "type": "boolean"
    },
    "idempotency_key": {
      "type": "string",
      "minLength": 8,
      "maxLength": 128,
      "pattern": "^[A-Za-z0-9._:-]+$"
    }
  },
  "required": [
    "to",
    "text",
    "confirmed",
    "idempotency_key"
  ],
  "additionalProperties": false
}
Schema de saída
{
  "type": "object",
  "properties": {
    "schema_version": {
      "const": 1
    },
    "ok": {
      "type": "boolean"
    },
    "operation": {
      "const": "send_whatsapp"
    },
    "request_id": {
      "type": "string",
      "format": "uuid"
    },
    "effects": {
      "const": "external_message"
    },
    "data": {
      "type": [
        "object",
        "null"
      ]
    },
    "error": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "code": {
              "type": "string",
              "minLength": 2,
              "maxLength": 64,
              "pattern": "^[A-Z][A-Z0-9_]+$"
            },
            "message": {
              "type": "string",
              "minLength": 1,
              "maxLength": 2048,
              "pattern": "^\\s*\\S[\\s\\S]*$"
            },
            "retryable": {
              "type": "boolean"
            },
            "outcome": {
              "enum": [
                "not_started",
                "rejected",
                "failed",
                "unknown"
              ]
            }
          },
          "required": [
            "code",
            "message",
            "retryable",
            "outcome"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "schema_version",
    "ok",
    "operation",
    "request_id",
    "effects",
    "data",
    "error"
  ],
  "additionalProperties": false,
  "oneOf": [
    {
      "properties": {
        "ok": {
          "const": true
        },
        "data": {
          "type": "object",
          "properties": {
            "conversation_id": {
              "type": "string",
              "format": "uuid"
            },
            "message_id": {
              "type": "string",
              "format": "uuid"
            },
            "provider_message_id": {
              "type": [
                "string",
                "null"
              ]
            },
            "accepted_by_provider": {
              "type": "boolean"
            },
            "delivery_status": {
              "enum": [
                "sent",
                "delivered",
                "read",
                "failed",
                "unknown"
              ]
            },
            "delivered_to_whatsapp": {
              "type": "boolean"
            },
            "sent_at": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ]
            },
            "delivered_at": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ]
            },
            "read_at": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ]
            },
            "channel_id": {
              "type": "string",
              "format": "uuid"
            },
            "contact_id": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid"
                },
                {
                  "type": "null"
                }
              ]
            },
            "created": {
              "type": "boolean"
            },
            "reopened": {
              "type": "boolean"
            }
          },
          "required": [
            "conversation_id",
            "message_id",
            "provider_message_id",
            "accepted_by_provider",
            "delivery_status",
            "delivered_to_whatsapp",
            "sent_at",
            "delivered_at",
            "read_at",
            "channel_id",
            "contact_id",
            "created",
            "reopened"
          ],
          "additionalProperties": false
        },
        "error": {
          "type": "null"
        }
      }
    },
    {
      "properties": {
        "ok": {
          "const": false
        },
        "data": {
          "type": [
            "object",
            "null"
          ]
        },
        "error": {
          "type": "object",
          "properties": {
            "code": {
              "type": "string",
              "minLength": 2,
              "maxLength": 64,
              "pattern": "^[A-Z][A-Z0-9_]+$"
            },
            "message": {
              "type": "string",
              "minLength": 1,
              "maxLength": 2048,
              "pattern": "^\\s*\\S[\\s\\S]*$"
            },
            "retryable": {
              "type": "boolean"
            },
            "outcome": {
              "enum": [
                "not_started",
                "rejected",
                "failed",
                "unknown"
              ]
            }
          },
          "required": [
            "code",
            "message",
            "retryable",
            "outcome"
          ],
          "additionalProperties": false
        }
      }
    }
  ]
}

Erros possíveis, lista não exaustiva: BAD_REQUEST, UNAUTHORIZED, SCOPE_DENIED, RATE_LIMITED, CONFIRMATION_REQUIRED, IDEMPOTENCY_KEY_INVALID, IDEMPOTENCY_PAYLOAD_MISMATCH, IDEMPOTENCY_IN_PROGRESS, IDEMPOTENCY_RESULT_UNKNOWN, IDEMPOTENCY_UNAVAILABLE, DESTINATION_UNAVAILABLE, DESTINATION_CHANGED, CONVERSATION_RESOLVED, DELIVERY_FAILED, DELIVERY_UNKNOWN.

get_message_statusConsultar e reconciliar status sem reenviar

Reconciliação de recibo, sem envio

Consulta o recibo e pode persistir evidência correlacionada do provedor. Nunca envia, reenvia ou marca a mensagem como lida.

Escopos OAuth: mcp:read.

Parâmetros de get_message_status
NomeObrigatórioDescrição
message_idSimUUID da mensagem WhatsApp persistida no SYSLED; não use provider_message_id.
Schema de entrada e limites
{
  "type": "object",
  "properties": {
    "message_id": {
      "type": "string",
      "format": "uuid"
    }
  },
  "required": [
    "message_id"
  ],
  "additionalProperties": false
}
Schema de saída
{
  "type": "object",
  "properties": {
    "schema_version": {
      "const": 1
    },
    "ok": {
      "type": "boolean"
    },
    "operation": {
      "const": "get_message_status"
    },
    "request_id": {
      "type": "string",
      "format": "uuid"
    },
    "effects": {
      "const": "receipt_reconciliation"
    },
    "data": {
      "type": [
        "object",
        "null"
      ]
    },
    "error": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "code": {
              "type": "string",
              "minLength": 2,
              "maxLength": 64,
              "pattern": "^[A-Z][A-Z0-9_]+$"
            },
            "message": {
              "type": "string",
              "minLength": 1,
              "maxLength": 2048,
              "pattern": "^\\s*\\S[\\s\\S]*$"
            },
            "retryable": {
              "type": "boolean"
            },
            "outcome": {
              "enum": [
                "not_started",
                "rejected",
                "failed",
                "unknown"
              ]
            }
          },
          "required": [
            "code",
            "message",
            "retryable",
            "outcome"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "schema_version",
    "ok",
    "operation",
    "request_id",
    "effects",
    "data",
    "error"
  ],
  "additionalProperties": false,
  "oneOf": [
    {
      "properties": {
        "ok": {
          "const": true
        },
        "data": {
          "type": "object",
          "properties": {
            "message": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "conversation_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "created_at": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "conversation_id",
                "created_at"
              ],
              "additionalProperties": false
            },
            "receipt": {
              "type": "object",
              "properties": {
                "message_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "conversation_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "accepted_by_provider": {
                  "type": "boolean"
                },
                "delivered_to_whatsapp": {
                  "type": "boolean"
                },
                "delivery_status": {
                  "enum": [
                    "sent",
                    "delivered",
                    "read",
                    "failed",
                    "unknown",
                    "not_applicable"
                  ]
                },
                "provider_message_id": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "delivered_at": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "read_at": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "error": {
                  "type": [
                    "object",
                    "null"
                  ]
                }
              },
              "required": [
                "message_id",
                "conversation_id",
                "accepted_by_provider",
                "delivered_to_whatsapp",
                "delivery_status",
                "provider_message_id",
                "delivered_at",
                "read_at"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "message",
            "receipt"
          ],
          "additionalProperties": false
        },
        "error": {
          "type": "null"
        }
      }
    },
    {
      "properties": {
        "ok": {
          "const": false
        },
        "data": {
          "type": [
            "object",
            "null"
          ]
        },
        "error": {
          "type": "object",
          "properties": {
            "code": {
              "type": "string",
              "minLength": 2,
              "maxLength": 64,
              "pattern": "^[A-Z][A-Z0-9_]+$"
            },
            "message": {
              "type": "string",
              "minLength": 1,
              "maxLength": 2048,
              "pattern": "^\\s*\\S[\\s\\S]*$"
            },
            "retryable": {
              "type": "boolean"
            },
            "outcome": {
              "enum": [
                "not_started",
                "rejected",
                "failed",
                "unknown"
              ]
            }
          },
          "required": [
            "code",
            "message",
            "retryable",
            "outcome"
          ],
          "additionalProperties": false
        }
      }
    }
  ]
}

Erros possíveis, lista não exaustiva: BAD_REQUEST, UNAUTHORIZED, SCOPE_DENIED, NOT_FOUND, RATE_LIMITED, AGENT_READ_UNAVAILABLE, UPSTREAM_ERROR, UPSTREAM_INVALID_RESPONSE, UPSTREAM_TIMEOUT, NETWORK_ERROR, CANCELLED.

get_message_status_batchConsultar recibos em lote sem reenviar

Reconciliação de recibo, sem envio

Consulta até vinte recibos autorizados, preservando o resultado de cada item. Pode reconciliar evidência sem enviar mensagens.

Escopos OAuth: mcp:read.

Parâmetros de get_message_status_batch
NomeObrigatórioDescrição
message_idsSimDe 1 a 20 UUIDs únicos de mensagens WhatsApp, na ordem desejada para a resposta.
Schema de entrada e limites
{
  "type": "object",
  "properties": {
    "message_ids": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "uuid"
      },
      "maxItems": 20,
      "minItems": 1,
      "uniqueItems": true
    }
  },
  "required": [
    "message_ids"
  ],
  "additionalProperties": false
}
Schema de saída
{
  "type": "object",
  "properties": {
    "schema_version": {
      "const": 1
    },
    "ok": {
      "type": "boolean"
    },
    "operation": {
      "const": "get_message_status_batch"
    },
    "request_id": {
      "type": "string",
      "format": "uuid"
    },
    "effects": {
      "const": "receipt_reconciliation"
    },
    "data": {
      "type": [
        "object",
        "null"
      ]
    },
    "error": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "code": {
              "type": "string",
              "minLength": 2,
              "maxLength": 64,
              "pattern": "^[A-Z][A-Z0-9_]+$"
            },
            "message": {
              "type": "string",
              "minLength": 1,
              "maxLength": 2048,
              "pattern": "^\\s*\\S[\\s\\S]*$"
            },
            "retryable": {
              "type": "boolean"
            },
            "outcome": {
              "enum": [
                "not_started",
                "rejected",
                "failed",
                "unknown"
              ]
            }
          },
          "required": [
            "code",
            "message",
            "retryable",
            "outcome"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "schema_version",
    "ok",
    "operation",
    "request_id",
    "effects",
    "data",
    "error"
  ],
  "additionalProperties": false,
  "oneOf": [
    {
      "properties": {
        "ok": {
          "const": true
        },
        "data": {
          "type": "object",
          "properties": {
            "results": {
              "type": "array",
              "items": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "message_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "ok": {
                        "const": true
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "message": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "conversation_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "created_at": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "format": "date-time"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "id",
                              "conversation_id",
                              "created_at"
                            ],
                            "additionalProperties": false
                          },
                          "receipt": {
                            "type": "object",
                            "properties": {
                              "message_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "conversation_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "accepted_by_provider": {
                                "type": "boolean"
                              },
                              "delivered_to_whatsapp": {
                                "type": "boolean"
                              },
                              "delivery_status": {
                                "enum": [
                                  "sent",
                                  "delivered",
                                  "read",
                                  "failed",
                                  "unknown",
                                  "not_applicable"
                                ]
                              },
                              "provider_message_id": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "delivered_at": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "format": "date-time"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "read_at": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "format": "date-time"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "error": {
                                "type": [
                                  "object",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "message_id",
                              "conversation_id",
                              "accepted_by_provider",
                              "delivered_to_whatsapp",
                              "delivery_status",
                              "provider_message_id",
                              "delivered_at",
                              "read_at"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "message",
                          "receipt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "message_id",
                      "ok",
                      "data"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "message_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "ok": {
                        "const": false
                      },
                      "error": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string",
                            "minLength": 2,
                            "maxLength": 64,
                            "pattern": "^[A-Z][A-Z0-9_]+$"
                          },
                          "message": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 2048,
                            "pattern": "^\\s*\\S[\\s\\S]*$"
                          },
                          "retryable": {
                            "type": "boolean"
                          },
                          "outcome": {
                            "enum": [
                              "not_started",
                              "rejected",
                              "failed",
                              "unknown"
                            ]
                          }
                        },
                        "required": [
                          "code",
                          "message",
                          "retryable",
                          "outcome"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "message_id",
                      "ok",
                      "error"
                    ],
                    "additionalProperties": false
                  }
                ]
              },
              "maxItems": 20,
              "minItems": 1
            }
          },
          "required": [
            "results"
          ],
          "additionalProperties": false
        },
        "error": {
          "type": "null"
        }
      }
    },
    {
      "properties": {
        "ok": {
          "const": false
        },
        "data": {
          "type": [
            "object",
            "null"
          ]
        },
        "error": {
          "type": "object",
          "properties": {
            "code": {
              "type": "string",
              "minLength": 2,
              "maxLength": 64,
              "pattern": "^[A-Z][A-Z0-9_]+$"
            },
            "message": {
              "type": "string",
              "minLength": 1,
              "maxLength": 2048,
              "pattern": "^\\s*\\S[\\s\\S]*$"
            },
            "retryable": {
              "type": "boolean"
            },
            "outcome": {
              "enum": [
                "not_started",
                "rejected",
                "failed",
                "unknown"
              ]
            }
          },
          "required": [
            "code",
            "message",
            "retryable",
            "outcome"
          ],
          "additionalProperties": false
        }
      }
    }
  ]
}

Erros possíveis, lista não exaustiva: BAD_REQUEST, UNAUTHORIZED, SCOPE_DENIED, NOT_FOUND, RATE_LIMITED, AGENT_READ_UNAVAILABLE, UPSTREAM_ERROR, UPSTREAM_INVALID_RESPONSE, UPSTREAM_TIMEOUT, NETWORK_ERROR, CANCELLED.

get_inbox_summaryResumir indicadores objetivos da fila

Leitura

Resume contagens objetivas da fila. Não mede SLA; para cobertura e prazos por política, use get_sla_summary.

Escopos OAuth: mcp:read.

Entrada: objeto vazio {}.

Schema de entrada e limites
{
  "type": "object",
  "properties": {},
  "required": [],
  "additionalProperties": false
}
Schema de saída
{
  "type": "object",
  "properties": {
    "schema_version": {
      "const": 1
    },
    "ok": {
      "type": "boolean"
    },
    "operation": {
      "const": "get_inbox_summary"
    },
    "request_id": {
      "type": "string",
      "format": "uuid"
    },
    "effects": {
      "const": "none"
    },
    "data": {
      "type": [
        "object",
        "null"
      ]
    },
    "error": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "code": {
              "type": "string",
              "minLength": 2,
              "maxLength": 64,
              "pattern": "^[A-Z][A-Z0-9_]+$"
            },
            "message": {
              "type": "string",
              "minLength": 1,
              "maxLength": 2048,
              "pattern": "^\\s*\\S[\\s\\S]*$"
            },
            "retryable": {
              "type": "boolean"
            },
            "outcome": {
              "enum": [
                "not_started",
                "rejected",
                "failed",
                "unknown"
              ]
            }
          },
          "required": [
            "code",
            "message",
            "retryable",
            "outcome"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "schema_version",
    "ok",
    "operation",
    "request_id",
    "effects",
    "data",
    "error"
  ],
  "additionalProperties": false,
  "oneOf": [
    {
      "properties": {
        "ok": {
          "const": true
        },
        "data": {
          "type": "object",
          "properties": {
            "total": {
              "type": "integer",
              "minimum": 0
            },
            "open": {
              "type": "integer",
              "minimum": 0
            },
            "pending": {
              "type": "integer",
              "minimum": 0
            },
            "unread": {
              "type": "integer",
              "minimum": 0
            },
            "unassigned": {
              "type": "integer",
              "minimum": 0
            },
            "awaiting_reply": {
              "type": "integer",
              "minimum": 0
            },
            "delivery_failed": {
              "type": "integer",
              "minimum": 0
            },
            "needs_attention": {
              "type": "integer",
              "minimum": 0
            },
            "attention_criteria": {
              "type": "string"
            },
            "sla": {
              "type": "object",
              "properties": {
                "measured": {
                  "const": false
                }
              },
              "required": [
                "measured"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "total",
            "open",
            "pending",
            "unread",
            "unassigned",
            "awaiting_reply",
            "delivery_failed",
            "needs_attention",
            "attention_criteria",
            "sla"
          ],
          "additionalProperties": false
        },
        "error": {
          "type": "null"
        }
      }
    },
    {
      "properties": {
        "ok": {
          "const": false
        },
        "data": {
          "type": [
            "object",
            "null"
          ]
        },
        "error": {
          "type": "object",
          "properties": {
            "code": {
              "type": "string",
              "minLength": 2,
              "maxLength": 64,
              "pattern": "^[A-Z][A-Z0-9_]+$"
            },
            "message": {
              "type": "string",
              "minLength": 1,
              "maxLength": 2048,
              "pattern": "^\\s*\\S[\\s\\S]*$"
            },
            "retryable": {
              "type": "boolean"
            },
            "outcome": {
              "enum": [
                "not_started",
                "rejected",
                "failed",
                "unknown"
              ]
            }
          },
          "required": [
            "code",
            "message",
            "retryable",
            "outcome"
          ],
          "additionalProperties": false
        }
      }
    }
  ]
}

Erros possíveis, lista não exaustiva: BAD_REQUEST, UNAUTHORIZED, SCOPE_DENIED, RATE_LIMITED, AGENT_READ_UNAVAILABLE.

Exemplo sintético, não executado

Entrada

{}

Saída ilustrativa; não demonstra uma execução real.

{
  "schema_version": 1,
  "ok": true,
  "operation": "get_inbox_summary",
  "request_id": "44444444-4444-4444-8444-444444444451",
  "effects": "none",
  "data": {
    "total": 0,
    "open": 0,
    "pending": 0,
    "unread": 0,
    "unassigned": 0,
    "awaiting_reply": 0,
    "delivery_failed": 0,
    "needs_attention": 0,
    "attention_criteria": "unread, unassigned, pending, awaiting reply or delivery failed",
    "sla": {
      "measured": false
    }
  },
  "error": null
}
get_conversations_needing_attentionListar conversas que exigem atenção

Leitura

Lista conversas por sinais objetivos de atenção. Esses sinais não constituem medição de prazo ou prioridade de SLA.

Escopos OAuth: mcp:read.

Parâmetros de get_conversations_needing_attention
NomeObrigatórioDescrição
limitNãoQuantidade por página, de 1 a 100; padrão 20.
cursorNãoCursor opaco da página anterior, vinculado à empresa, identidade e versão dos critérios.
Schema de entrada e limites
{
  "type": "object",
  "properties": {
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 100,
      "default": 20
    },
    "cursor": {
      "type": "string",
      "minLength": 1,
      "maxLength": 2048,
      "pattern": "^\\s*\\S[\\s\\S]*$"
    }
  },
  "required": [],
  "additionalProperties": false
}
Schema de saída
{
  "type": "object",
  "properties": {
    "schema_version": {
      "const": 1
    },
    "ok": {
      "type": "boolean"
    },
    "operation": {
      "const": "get_conversations_needing_attention"
    },
    "request_id": {
      "type": "string",
      "format": "uuid"
    },
    "effects": {
      "const": "none"
    },
    "data": {
      "type": [
        "object",
        "null"
      ]
    },
    "error": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "code": {
              "type": "string",
              "minLength": 2,
              "maxLength": 64,
              "pattern": "^[A-Z][A-Z0-9_]+$"
            },
            "message": {
              "type": "string",
              "minLength": 1,
              "maxLength": 2048,
              "pattern": "^\\s*\\S[\\s\\S]*$"
            },
            "retryable": {
              "type": "boolean"
            },
            "outcome": {
              "enum": [
                "not_started",
                "rejected",
                "failed",
                "unknown"
              ]
            }
          },
          "required": [
            "code",
            "message",
            "retryable",
            "outcome"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "schema_version",
    "ok",
    "operation",
    "request_id",
    "effects",
    "data",
    "error"
  ],
  "additionalProperties": false,
  "oneOf": [
    {
      "properties": {
        "ok": {
          "const": true
        },
        "data": {
          "type": "object",
          "properties": {
            "conversations": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "company_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "channel_id": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "contact_id": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "status": {
                    "type": "string"
                  },
                  "assignee_id": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "unread": {
                    "type": "boolean"
                  },
                  "contact_name": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "channel_display_name": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "updated_at": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "last_incoming_at": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "last_outgoing_at": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "last_outgoing_delivery_status": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "attention_reasons": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 100,
                      "pattern": "^\\s*\\S[\\s\\S]*$"
                    },
                    "maxItems": 10,
                    "minItems": 0
                  }
                },
                "required": [
                  "id",
                  "company_id",
                  "channel_id",
                  "contact_id",
                  "status",
                  "assignee_id",
                  "unread",
                  "contact_name",
                  "channel_display_name",
                  "updated_at",
                  "last_incoming_at",
                  "last_outgoing_at",
                  "last_outgoing_delivery_status",
                  "attention_reasons"
                ],
                "additionalProperties": false
              },
              "maxItems": 100,
              "minItems": 0
            },
            "has_more": {
              "type": "boolean"
            },
            "next_cursor": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 2048,
                  "pattern": "^\\s*\\S[\\s\\S]*$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "attention_criteria": {
              "type": "string"
            },
            "sla": {
              "type": "object",
              "properties": {
                "measured": {
                  "const": false
                }
              },
              "required": [
                "measured"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "conversations",
            "has_more",
            "next_cursor",
            "attention_criteria",
            "sla"
          ],
          "additionalProperties": false
        },
        "error": {
          "type": "null"
        }
      }
    },
    {
      "properties": {
        "ok": {
          "const": false
        },
        "data": {
          "type": [
            "object",
            "null"
          ]
        },
        "error": {
          "type": "object",
          "properties": {
            "code": {
              "type": "string",
              "minLength": 2,
              "maxLength": 64,
              "pattern": "^[A-Z][A-Z0-9_]+$"
            },
            "message": {
              "type": "string",
              "minLength": 1,
              "maxLength": 2048,
              "pattern": "^\\s*\\S[\\s\\S]*$"
            },
            "retryable": {
              "type": "boolean"
            },
            "outcome": {
              "enum": [
                "not_started",
                "rejected",
                "failed",
                "unknown"
              ]
            }
          },
          "required": [
            "code",
            "message",
            "retryable",
            "outcome"
          ],
          "additionalProperties": false
        }
      }
    }
  ]
}

Erros possíveis, lista não exaustiva: BAD_REQUEST, UNAUTHORIZED, SCOPE_DENIED, RATE_LIMITED, AGENT_READ_UNAVAILABLE.

get_sla_summaryResumo de SLA com cobertura medida e indisponível

Leitura

Resume cobertura e violações de SLA. without_policy e unavailable não significam SLA saudável. SLA_READ_UNAVAILABLE é falha, nunca contagem zero.

Escopos OAuth: mcp:read.

Entrada: objeto vazio {}.

Schema de entrada e limites
{
  "type": "object",
  "properties": {},
  "required": [],
  "additionalProperties": false
}
Schema de saída
{
  "type": "object",
  "properties": {
    "schema_version": {
      "const": 1
    },
    "ok": {
      "type": "boolean"
    },
    "operation": {
      "const": "get_sla_summary"
    },
    "request_id": {
      "type": "string",
      "format": "uuid"
    },
    "effects": {
      "const": "none"
    },
    "data": {
      "type": [
        "object",
        "null"
      ]
    },
    "error": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "code": {
              "type": "string",
              "minLength": 2,
              "maxLength": 64,
              "pattern": "^[A-Z][A-Z0-9_]+$"
            },
            "message": {
              "type": "string",
              "minLength": 1,
              "maxLength": 2048,
              "pattern": "^\\s*\\S[\\s\\S]*$"
            },
            "retryable": {
              "type": "boolean"
            },
            "outcome": {
              "enum": [
                "not_started",
                "rejected",
                "failed",
                "unknown"
              ]
            }
          },
          "required": [
            "code",
            "message",
            "retryable",
            "outcome"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "schema_version",
    "ok",
    "operation",
    "request_id",
    "effects",
    "data",
    "error"
  ],
  "additionalProperties": false,
  "oneOf": [
    {
      "properties": {
        "ok": {
          "const": true
        },
        "data": {
          "type": "object",
          "properties": {
            "as_of": {
              "type": "string",
              "format": "date-time"
            },
            "criteria_version": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100,
              "pattern": "^\\s*\\S[\\s\\S]*$"
            },
            "coverage": {
              "type": "object",
              "properties": {
                "eligible": {
                  "type": "integer",
                  "minimum": 0
                },
                "measured": {
                  "type": "integer",
                  "minimum": 0
                },
                "without_policy": {
                  "type": "integer",
                  "minimum": 0
                },
                "unavailable": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "required": [
                "eligible",
                "measured",
                "without_policy",
                "unavailable"
              ],
              "additionalProperties": false
            },
            "breaches": {
              "type": "object",
              "properties": {
                "first_response": {
                  "type": "integer",
                  "minimum": 0
                },
                "next_response": {
                  "type": "integer",
                  "minimum": 0
                },
                "resolution": {
                  "type": "integer",
                  "minimum": 0
                },
                "conversations": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "required": [
                "first_response",
                "next_response",
                "resolution",
                "conversations"
              ],
              "additionalProperties": false
            },
            "states": {
              "type": "object",
              "properties": {
                "running": {
                  "type": "integer",
                  "minimum": 0
                },
                "met": {
                  "type": "integer",
                  "minimum": 0
                },
                "breached": {
                  "type": "integer",
                  "minimum": 0
                },
                "paused": {
                  "type": "integer",
                  "minimum": 0
                },
                "unavailable": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "required": [
                "running",
                "met",
                "breached",
                "paused",
                "unavailable"
              ],
              "additionalProperties": false
            },
            "clocks": {
              "type": "object",
              "properties": {
                "elapsed": {
                  "type": "integer",
                  "minimum": 0
                },
                "business": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "required": [
                "elapsed",
                "business"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "as_of",
            "criteria_version",
            "coverage",
            "breaches",
            "states",
            "clocks"
          ],
          "additionalProperties": false
        },
        "error": {
          "type": "null"
        }
      }
    },
    {
      "properties": {
        "ok": {
          "const": false
        },
        "data": {
          "type": [
            "object",
            "null"
          ]
        },
        "error": {
          "type": "object",
          "properties": {
            "code": {
              "type": "string",
              "minLength": 2,
              "maxLength": 64,
              "pattern": "^[A-Z][A-Z0-9_]+$"
            },
            "message": {
              "type": "string",
              "minLength": 1,
              "maxLength": 2048,
              "pattern": "^\\s*\\S[\\s\\S]*$"
            },
            "retryable": {
              "type": "boolean"
            },
            "outcome": {
              "enum": [
                "not_started",
                "rejected",
                "failed",
                "unknown"
              ]
            }
          },
          "required": [
            "code",
            "message",
            "retryable",
            "outcome"
          ],
          "additionalProperties": false
        }
      }
    }
  ]
}

Erros possíveis, lista não exaustiva: BAD_REQUEST, UNAUTHORIZED, SCOPE_DENIED, NOT_FOUND, RATE_LIMITED, UPSTREAM_ERROR, UPSTREAM_INVALID_RESPONSE, UPSTREAM_TIMEOUT, NETWORK_ERROR, CANCELLED, SLA_READ_UNAVAILABLE.

Exemplo sintético, não executado

Entrada

{}

Saída ilustrativa; não demonstra uma execução real.

{
  "schema_version": 1,
  "ok": true,
  "operation": "get_sla_summary",
  "request_id": "00000004-0004-4004-8004-000000000004",
  "effects": "none",
  "data": {
    "as_of": "2026-01-15T12:00:00Z",
    "criteria_version": "sla-v1-exemplo",
    "coverage": {
      "eligible": 2,
      "measured": 1,
      "without_policy": 1,
      "unavailable": 0
    },
    "breaches": {
      "first_response": 1,
      "next_response": 0,
      "resolution": 0,
      "conversations": 1
    },
    "states": {
      "running": 1,
      "met": 0,
      "breached": 1,
      "paused": 1,
      "unavailable": 0
    },
    "clocks": {
      "elapsed": 3,
      "business": 0
    }
  },
  "error": null
}
get_conversations_breaching_slaListar violações objetivas de SLA

Leitura

Lista violações objetivamente medidas e sua cobertura. Passe next_cursor sem alteração. Ausência de política ou falha de leitura não comprova cumprimento do SLA.

Escopos OAuth: mcp:read.

Parâmetros de get_conversations_breaching_sla
NomeObrigatórioDescrição
limitNãoQuantidade máxima de itens da página. Respeite o intervalo e o padrão do schema; contagem de lote não é total integral.
cursorNãoCursor opaco devolvido por next_cursor; passe sem alterações. Não é número de página nem permissão e continua sujeito ao escopo atual.
Schema de entrada e limites
{
  "type": "object",
  "properties": {
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 100,
      "default": 20
    },
    "cursor": {
      "type": "string",
      "minLength": 1,
      "maxLength": 2048,
      "pattern": "^\\s*\\S[\\s\\S]*$"
    }
  },
  "required": [],
  "additionalProperties": false
}
Schema de saída
{
  "type": "object",
  "properties": {
    "schema_version": {
      "const": 1
    },
    "ok": {
      "type": "boolean"
    },
    "operation": {
      "const": "get_conversations_breaching_sla"
    },
    "request_id": {
      "type": "string",
      "format": "uuid"
    },
    "effects": {
      "const": "none"
    },
    "data": {
      "type": [
        "object",
        "null"
      ]
    },
    "error": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "code": {
              "type": "string",
              "minLength": 2,
              "maxLength": 64,
              "pattern": "^[A-Z][A-Z0-9_]+$"
            },
            "message": {
              "type": "string",
              "minLength": 1,
              "maxLength": 2048,
              "pattern": "^\\s*\\S[\\s\\S]*$"
            },
            "retryable": {
              "type": "boolean"
            },
            "outcome": {
              "enum": [
                "not_started",
                "rejected",
                "failed",
                "unknown"
              ]
            }
          },
          "required": [
            "code",
            "message",
            "retryable",
            "outcome"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "schema_version",
    "ok",
    "operation",
    "request_id",
    "effects",
    "data",
    "error"
  ],
  "additionalProperties": false,
  "oneOf": [
    {
      "properties": {
        "ok": {
          "const": true
        },
        "data": {
          "type": "object",
          "properties": {
            "as_of": {
              "type": "string",
              "format": "date-time"
            },
            "criteria_version": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100,
              "pattern": "^\\s*\\S[\\s\\S]*$"
            },
            "conversations": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "company_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "channel_id": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "contact_id": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "status": {
                    "enum": [
                      "open",
                      "pending",
                      "resolved",
                      "archived"
                    ]
                  },
                  "assignee_id": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "contact_name": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "channel_display_name": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "metrics": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "metric": {
                          "enum": [
                            "first_response",
                            "next_response",
                            "resolution"
                          ]
                        },
                        "state": {
                          "enum": [
                            "running",
                            "met",
                            "breached",
                            "paused",
                            "unavailable"
                          ]
                        },
                        "clock": {
                          "enum": [
                            "elapsed",
                            "business"
                          ]
                        },
                        "started_at": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "date-time"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "due_at": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "date-time"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "breached_at": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "date-time"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "completed_at": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "date-time"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "metric",
                        "state",
                        "clock",
                        "started_at",
                        "due_at",
                        "breached_at",
                        "completed_at"
                      ],
                      "additionalProperties": false
                    },
                    "maxItems": 3,
                    "minItems": 1
                  }
                },
                "required": [
                  "id",
                  "company_id",
                  "channel_id",
                  "contact_id",
                  "status",
                  "assignee_id",
                  "contact_name",
                  "channel_display_name",
                  "metrics"
                ],
                "additionalProperties": false
              },
              "maxItems": 100,
              "minItems": 0
            },
            "has_more": {
              "type": "boolean"
            },
            "next_cursor": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 2048,
                  "pattern": "^\\s*\\S[\\s\\S]*$"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "as_of",
            "criteria_version",
            "conversations",
            "has_more",
            "next_cursor"
          ],
          "additionalProperties": false
        },
        "error": {
          "type": "null"
        }
      }
    },
    {
      "properties": {
        "ok": {
          "const": false
        },
        "data": {
          "type": [
            "object",
            "null"
          ]
        },
        "error": {
          "type": "object",
          "properties": {
            "code": {
              "type": "string",
              "minLength": 2,
              "maxLength": 64,
              "pattern": "^[A-Z][A-Z0-9_]+$"
            },
            "message": {
              "type": "string",
              "minLength": 1,
              "maxLength": 2048,
              "pattern": "^\\s*\\S[\\s\\S]*$"
            },
            "retryable": {
              "type": "boolean"
            },
            "outcome": {
              "enum": [
                "not_started",
                "rejected",
                "failed",
                "unknown"
              ]
            }
          },
          "required": [
            "code",
            "message",
            "retryable",
            "outcome"
          ],
          "additionalProperties": false
        }
      }
    }
  ]
}

Erros possíveis, lista não exaustiva: BAD_REQUEST, UNAUTHORIZED, SCOPE_DENIED, NOT_FOUND, RATE_LIMITED, UPSTREAM_ERROR, UPSTREAM_INVALID_RESPONSE, UPSTREAM_TIMEOUT, NETWORK_ERROR, CANCELLED, SLA_READ_UNAVAILABLE, SLA_CURSOR_UNAVAILABLE, INVALID_CURSOR.

resolve_conversationResolver uma conversa com estado esperado

Atualização de conversa com confirmação

Muda open ou pending para resolved após verificar estado esperado e confirmação. Alterar o status não comprova solução do problema do cliente.

Escopos OAuth: mcp:read + mcp:write.

Exige confirmação humana específica. confirmed:true é uma atestação do cliente, não prova independente de consentimento. Preserve a mesma chave para reconciliar uma tentativa incerta quando a operação exigir idempotência. Transições podem iniciar efeitos posteriores conforme a política da empresa.

Parâmetros de resolve_conversation
NomeObrigatórioDescrição
conversation_idSimUUID da conversa autorizada; acesso é revalidado para a identidade e empresa atuais.
expected_statusSimEstado observado antes da transição. Deve corresponder ao estado atual; conflito concorrente produz STATE_CONFLICT. Valores permitidos dependem da operação.
confirmedSimDeve ser true somente após confirmação humana específica da ação e efeitos. É atestação do cliente, não prova independente de consentimento.
idempotency_keySimChave estável de uma única intenção e payload, com caracteres A–Z/a–z/0–9/._:-. Reconcilie resultado incerto com a chave original; não gere outra para repetir.
Schema de entrada e limites
{
  "type": "object",
  "properties": {
    "conversation_id": {
      "type": "string",
      "format": "uuid"
    },
    "expected_status": {
      "enum": [
        "open",
        "pending"
      ]
    },
    "confirmed": {
      "const": true,
      "type": "boolean"
    },
    "idempotency_key": {
      "type": "string",
      "minLength": 8,
      "maxLength": 128,
      "pattern": "^[A-Za-z0-9._:-]+$"
    }
  },
  "required": [
    "conversation_id",
    "expected_status",
    "confirmed",
    "idempotency_key"
  ],
  "additionalProperties": false
}
Schema de saída
{
  "type": "object",
  "properties": {
    "schema_version": {
      "const": 1
    },
    "ok": {
      "type": "boolean"
    },
    "operation": {
      "const": "resolve_conversation"
    },
    "request_id": {
      "type": "string",
      "format": "uuid"
    },
    "effects": {
      "const": "internal_update"
    },
    "data": {
      "type": [
        "object",
        "null"
      ]
    },
    "error": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "code": {
              "type": "string",
              "minLength": 2,
              "maxLength": 64,
              "pattern": "^[A-Z][A-Z0-9_]+$"
            },
            "message": {
              "type": "string",
              "minLength": 1,
              "maxLength": 2048,
              "pattern": "^\\s*\\S[\\s\\S]*$"
            },
            "retryable": {
              "type": "boolean"
            },
            "outcome": {
              "enum": [
                "not_started",
                "rejected",
                "failed",
                "unknown"
              ]
            }
          },
          "required": [
            "code",
            "message",
            "retryable",
            "outcome"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "schema_version",
    "ok",
    "operation",
    "request_id",
    "effects",
    "data",
    "error"
  ],
  "additionalProperties": false,
  "oneOf": [
    {
      "properties": {
        "ok": {
          "const": true
        },
        "data": {
          "type": "object",
          "properties": {
            "conversation_id": {
              "type": "string",
              "format": "uuid"
            },
            "operation": {
              "const": "resolve"
            },
            "changed": {
              "type": "boolean"
            },
            "transition_committed": {
              "type": "boolean"
            },
            "transition": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "committed_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "actor_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "from": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "enum": [
                            "open",
                            "pending",
                            "resolved",
                            "archived"
                          ]
                        },
                        "assignee_id": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "status",
                        "assignee_id"
                      ],
                      "additionalProperties": false
                    },
                    "to": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "enum": [
                            "open",
                            "pending",
                            "resolved",
                            "archived"
                          ]
                        },
                        "assignee_id": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "status",
                        "assignee_id"
                      ],
                      "additionalProperties": false
                    },
                    "activity_message_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "id",
                    "committed_at",
                    "actor_id",
                    "from",
                    "to",
                    "activity_message_id"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            },
            "conversation": {
              "type": "object",
              "properties": {
                "status": {
                  "enum": [
                    "open",
                    "pending",
                    "resolved",
                    "archived"
                  ]
                },
                "assignee_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "unread": {
                  "type": "boolean"
                },
                "resolved_at": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "last_reopened_at": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "status",
                "assignee_id"
              ],
              "additionalProperties": false
            },
            "follow_up_effects": {
              "type": "object",
              "properties": {
                "state": {
                  "enum": [
                    "none",
                    "queued",
                    "completed",
                    "partial",
                    "unavailable"
                  ]
                },
                "items": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 80,
                        "pattern": "^\\s*\\S[\\s\\S]*$"
                      },
                      "state": {
                        "enum": [
                          "pending",
                          "processing",
                          "completed",
                          "failed",
                          "dead_letter"
                        ]
                      }
                    },
                    "required": [
                      "type",
                      "state"
                    ],
                    "additionalProperties": false
                  },
                  "maxItems": 20,
                  "minItems": 0
                }
              },
              "required": [
                "state",
                "items"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "conversation_id",
            "operation",
            "changed",
            "transition_committed",
            "transition",
            "conversation",
            "follow_up_effects"
          ],
          "additionalProperties": false
        },
        "error": {
          "type": "null"
        }
      }
    },
    {
      "properties": {
        "ok": {
          "const": false
        },
        "data": {
          "type": [
            "object",
            "null"
          ]
        },
        "error": {
          "type": "object",
          "properties": {
            "code": {
              "type": "string",
              "minLength": 2,
              "maxLength": 64,
              "pattern": "^[A-Z][A-Z0-9_]+$"
            },
            "message": {
              "type": "string",
              "minLength": 1,
              "maxLength": 2048,
              "pattern": "^\\s*\\S[\\s\\S]*$"
            },
            "retryable": {
              "type": "boolean"
            },
            "outcome": {
              "enum": [
                "not_started",
                "rejected",
                "failed",
                "unknown"
              ]
            }
          },
          "required": [
            "code",
            "message",
            "retryable",
            "outcome"
          ],
          "additionalProperties": false
        }
      }
    }
  ]
}

Erros possíveis, lista não exaustiva: BAD_REQUEST, UNAUTHORIZED, SCOPE_DENIED, NOT_FOUND, RATE_LIMITED, UPSTREAM_ERROR, UPSTREAM_INVALID_RESPONSE, UPSTREAM_TIMEOUT, NETWORK_ERROR, CANCELLED, FORBIDDEN, INVALID_ARGUMENT, CONFIRMATION_REQUIRED, IDEMPOTENCY_KEY_INVALID, IDEMPOTENCY_PAYLOAD_MISMATCH, IDEMPOTENCY_IN_PROGRESS, STATE_CONFLICT, REQUIRED_FIELDS_MISSING, AUTHORIZATION_UNAVAILABLE, VALIDATION_UNAVAILABLE, TRANSITION_UNAVAILABLE, TRANSITION_RESULT_UNKNOWN.

reopen_conversationReabrir uma conversa com confirmação

Atualização de conversa com confirmação

Muda resolved ou pending para open após verificar o estado esperado e receber confirmação. A permissão é revalidada na operação.

Escopos OAuth: mcp:read + mcp:write.

Exige confirmação humana específica. confirmed:true é uma atestação do cliente, não prova independente de consentimento. Preserve a mesma chave para reconciliar uma tentativa incerta quando a operação exigir idempotência. Transições podem iniciar efeitos posteriores conforme a política da empresa.

Parâmetros de reopen_conversation
NomeObrigatórioDescrição
conversation_idSimUUID da conversa autorizada; acesso é revalidado para a identidade e empresa atuais.
expected_statusSimEstado observado antes da transição. Deve corresponder ao estado atual; conflito concorrente produz STATE_CONFLICT. Valores permitidos dependem da operação.
confirmedSimDeve ser true somente após confirmação humana específica da ação e efeitos. É atestação do cliente, não prova independente de consentimento.
idempotency_keySimChave estável de uma única intenção e payload, com caracteres A–Z/a–z/0–9/._:-. Reconcilie resultado incerto com a chave original; não gere outra para repetir.
Schema de entrada e limites
{
  "type": "object",
  "properties": {
    "conversation_id": {
      "type": "string",
      "format": "uuid"
    },
    "expected_status": {
      "enum": [
        "resolved",
        "pending"
      ]
    },
    "confirmed": {
      "const": true,
      "type": "boolean"
    },
    "idempotency_key": {
      "type": "string",
      "minLength": 8,
      "maxLength": 128,
      "pattern": "^[A-Za-z0-9._:-]+$"
    }
  },
  "required": [
    "conversation_id",
    "expected_status",
    "confirmed",
    "idempotency_key"
  ],
  "additionalProperties": false
}
Schema de saída
{
  "type": "object",
  "properties": {
    "schema_version": {
      "const": 1
    },
    "ok": {
      "type": "boolean"
    },
    "operation": {
      "const": "reopen_conversation"
    },
    "request_id": {
      "type": "string",
      "format": "uuid"
    },
    "effects": {
      "const": "internal_update"
    },
    "data": {
      "type": [
        "object",
        "null"
      ]
    },
    "error": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "code": {
              "type": "string",
              "minLength": 2,
              "maxLength": 64,
              "pattern": "^[A-Z][A-Z0-9_]+$"
            },
            "message": {
              "type": "string",
              "minLength": 1,
              "maxLength": 2048,
              "pattern": "^\\s*\\S[\\s\\S]*$"
            },
            "retryable": {
              "type": "boolean"
            },
            "outcome": {
              "enum": [
                "not_started",
                "rejected",
                "failed",
                "unknown"
              ]
            }
          },
          "required": [
            "code",
            "message",
            "retryable",
            "outcome"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "schema_version",
    "ok",
    "operation",
    "request_id",
    "effects",
    "data",
    "error"
  ],
  "additionalProperties": false,
  "oneOf": [
    {
      "properties": {
        "ok": {
          "const": true
        },
        "data": {
          "type": "object",
          "properties": {
            "conversation_id": {
              "type": "string",
              "format": "uuid"
            },
            "operation": {
              "const": "reopen"
            },
            "changed": {
              "type": "boolean"
            },
            "transition_committed": {
              "type": "boolean"
            },
            "transition": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "committed_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "actor_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "from": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "enum": [
                            "open",
                            "pending",
                            "resolved",
                            "archived"
                          ]
                        },
                        "assignee_id": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "status",
                        "assignee_id"
                      ],
                      "additionalProperties": false
                    },
                    "to": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "enum": [
                            "open",
                            "pending",
                            "resolved",
                            "archived"
                          ]
                        },
                        "assignee_id": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "status",
                        "assignee_id"
                      ],
                      "additionalProperties": false
                    },
                    "activity_message_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "id",
                    "committed_at",
                    "actor_id",
                    "from",
                    "to",
                    "activity_message_id"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            },
            "conversation": {
              "type": "object",
              "properties": {
                "status": {
                  "enum": [
                    "open",
                    "pending",
                    "resolved",
                    "archived"
                  ]
                },
                "assignee_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "unread": {
                  "type": "boolean"
                },
                "resolved_at": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "last_reopened_at": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "status",
                "assignee_id"
              ],
              "additionalProperties": false
            },
            "follow_up_effects": {
              "type": "object",
              "properties": {
                "state": {
                  "enum": [
                    "none",
                    "queued",
                    "completed",
                    "partial",
                    "unavailable"
                  ]
                },
                "items": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 80,
                        "pattern": "^\\s*\\S[\\s\\S]*$"
                      },
                      "state": {
                        "enum": [
                          "pending",
                          "processing",
                          "completed",
                          "failed",
                          "dead_letter"
                        ]
                      }
                    },
                    "required": [
                      "type",
                      "state"
                    ],
                    "additionalProperties": false
                  },
                  "maxItems": 20,
                  "minItems": 0
                }
              },
              "required": [
                "state",
                "items"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "conversation_id",
            "operation",
            "changed",
            "transition_committed",
            "transition",
            "conversation",
            "follow_up_effects"
          ],
          "additionalProperties": false
        },
        "error": {
          "type": "null"
        }
      }
    },
    {
      "properties": {
        "ok": {
          "const": false
        },
        "data": {
          "type": [
            "object",
            "null"
          ]
        },
        "error": {
          "type": "object",
          "properties": {
            "code": {
              "type": "string",
              "minLength": 2,
              "maxLength": 64,
              "pattern": "^[A-Z][A-Z0-9_]+$"
            },
            "message": {
              "type": "string",
              "minLength": 1,
              "maxLength": 2048,
              "pattern": "^\\s*\\S[\\s\\S]*$"
            },
            "retryable": {
              "type": "boolean"
            },
            "outcome": {
              "enum": [
                "not_started",
                "rejected",
                "failed",
                "unknown"
              ]
            }
          },
          "required": [
            "code",
            "message",
            "retryable",
            "outcome"
          ],
          "additionalProperties": false
        }
      }
    }
  ]
}

Erros possíveis, lista não exaustiva: BAD_REQUEST, UNAUTHORIZED, SCOPE_DENIED, NOT_FOUND, RATE_LIMITED, UPSTREAM_ERROR, UPSTREAM_INVALID_RESPONSE, UPSTREAM_TIMEOUT, NETWORK_ERROR, CANCELLED, FORBIDDEN, INVALID_ARGUMENT, CONFIRMATION_REQUIRED, IDEMPOTENCY_KEY_INVALID, IDEMPOTENCY_PAYLOAD_MISMATCH, IDEMPOTENCY_IN_PROGRESS, STATE_CONFLICT, REQUIRED_FIELDS_MISSING, AUTHORIZATION_UNAVAILABLE, VALIDATION_UNAVAILABLE, TRANSITION_UNAVAILABLE, TRANSITION_RESULT_UNKNOWN.

assign_conversationAtribuir conversa a atendente exato

Atualização de conversa com confirmação

Atribui a conversa a um atendente ativo exato, preservando o status. Exige estado e responsável esperados; ambiguidade ou concorrência impedem a alteração.

Escopos OAuth: mcp:read + mcp:write.

Exige confirmação humana específica. confirmed:true é uma atestação do cliente, não prova independente de consentimento. Preserve a mesma chave para reconciliar uma tentativa incerta quando a operação exigir idempotência. Transições podem iniciar efeitos posteriores conforme a política da empresa.

Parâmetros de assign_conversation
NomeObrigatórioDescrição
conversation_idSimUUID da conversa autorizada; acesso é revalidado para a identidade e empresa atuais.
assigneeSimUUID, nome ou nome de exibição exato de atendente ativo na empresa autorizada; ambiguidade falha, sem escolher silenciosamente.
expected_statusSimEstado observado antes da transição. Deve corresponder ao estado atual; conflito concorrente produz STATE_CONFLICT. Valores permitidos dependem da operação.
expected_assignee_idSimResponsável observado antes da atribuição: UUID, ou null quando não havia responsável. É obrigatório e comparado ao estado atual; divergência produz STATE_CONFLICT.
confirmedSimDeve ser true somente após confirmação humana específica da ação e efeitos. É atestação do cliente, não prova independente de consentimento.
idempotency_keySimChave estável de uma única intenção e payload, com caracteres A–Z/a–z/0–9/._:-. Reconcilie resultado incerto com a chave original; não gere outra para repetir.
Schema de entrada e limites
{
  "type": "object",
  "properties": {
    "conversation_id": {
      "type": "string",
      "format": "uuid"
    },
    "assignee": {
      "type": "string",
      "minLength": 1,
      "maxLength": 256,
      "pattern": "^\\s*\\S[\\s\\S]*$"
    },
    "expected_status": {
      "enum": [
        "open",
        "pending",
        "resolved",
        "archived"
      ]
    },
    "expected_assignee_id": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ]
    },
    "confirmed": {
      "const": true,
      "type": "boolean"
    },
    "idempotency_key": {
      "type": "string",
      "minLength": 8,
      "maxLength": 128,
      "pattern": "^[A-Za-z0-9._:-]+$"
    }
  },
  "required": [
    "conversation_id",
    "assignee",
    "expected_status",
    "expected_assignee_id",
    "confirmed",
    "idempotency_key"
  ],
  "additionalProperties": false
}
Schema de saída
{
  "type": "object",
  "properties": {
    "schema_version": {
      "const": 1
    },
    "ok": {
      "type": "boolean"
    },
    "operation": {
      "const": "assign_conversation"
    },
    "request_id": {
      "type": "string",
      "format": "uuid"
    },
    "effects": {
      "const": "internal_update"
    },
    "data": {
      "type": [
        "object",
        "null"
      ]
    },
    "error": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "code": {
              "type": "string",
              "minLength": 2,
              "maxLength": 64,
              "pattern": "^[A-Z][A-Z0-9_]+$"
            },
            "message": {
              "type": "string",
              "minLength": 1,
              "maxLength": 2048,
              "pattern": "^\\s*\\S[\\s\\S]*$"
            },
            "retryable": {
              "type": "boolean"
            },
            "outcome": {
              "enum": [
                "not_started",
                "rejected",
                "failed",
                "unknown"
              ]
            }
          },
          "required": [
            "code",
            "message",
            "retryable",
            "outcome"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "schema_version",
    "ok",
    "operation",
    "request_id",
    "effects",
    "data",
    "error"
  ],
  "additionalProperties": false,
  "oneOf": [
    {
      "properties": {
        "ok": {
          "const": true
        },
        "data": {
          "type": "object",
          "properties": {
            "conversation_id": {
              "type": "string",
              "format": "uuid"
            },
            "operation": {
              "const": "assign"
            },
            "changed": {
              "type": "boolean"
            },
            "transition_committed": {
              "type": "boolean"
            },
            "transition": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "committed_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "actor_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "from": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "enum": [
                            "open",
                            "pending",
                            "resolved",
                            "archived"
                          ]
                        },
                        "assignee_id": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "status",
                        "assignee_id"
                      ],
                      "additionalProperties": false
                    },
                    "to": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "enum": [
                            "open",
                            "pending",
                            "resolved",
                            "archived"
                          ]
                        },
                        "assignee_id": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "status",
                        "assignee_id"
                      ],
                      "additionalProperties": false
                    },
                    "activity_message_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "id",
                    "committed_at",
                    "actor_id",
                    "from",
                    "to",
                    "activity_message_id"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            },
            "conversation": {
              "type": "object",
              "properties": {
                "status": {
                  "enum": [
                    "open",
                    "pending",
                    "resolved",
                    "archived"
                  ]
                },
                "assignee_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "unread": {
                  "type": "boolean"
                },
                "resolved_at": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "last_reopened_at": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "status",
                "assignee_id"
              ],
              "additionalProperties": false
            },
            "follow_up_effects": {
              "type": "object",
              "properties": {
                "state": {
                  "enum": [
                    "none",
                    "queued",
                    "completed",
                    "partial",
                    "unavailable"
                  ]
                },
                "items": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 80,
                        "pattern": "^\\s*\\S[\\s\\S]*$"
                      },
                      "state": {
                        "enum": [
                          "pending",
                          "processing",
                          "completed",
                          "failed",
                          "dead_letter"
                        ]
                      }
                    },
                    "required": [
                      "type",
                      "state"
                    ],
                    "additionalProperties": false
                  },
                  "maxItems": 20,
                  "minItems": 0
                }
              },
              "required": [
                "state",
                "items"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "conversation_id",
            "operation",
            "changed",
            "transition_committed",
            "transition",
            "conversation",
            "follow_up_effects"
          ],
          "additionalProperties": false
        },
        "error": {
          "type": "null"
        }
      }
    },
    {
      "properties": {
        "ok": {
          "const": false
        },
        "data": {
          "type": [
            "object",
            "null"
          ]
        },
        "error": {
          "type": "object",
          "properties": {
            "code": {
              "type": "string",
              "minLength": 2,
              "maxLength": 64,
              "pattern": "^[A-Z][A-Z0-9_]+$"
            },
            "message": {
              "type": "string",
              "minLength": 1,
              "maxLength": 2048,
              "pattern": "^\\s*\\S[\\s\\S]*$"
            },
            "retryable": {
              "type": "boolean"
            },
            "outcome": {
              "enum": [
                "not_started",
                "rejected",
                "failed",
                "unknown"
              ]
            }
          },
          "required": [
            "code",
            "message",
            "retryable",
            "outcome"
          ],
          "additionalProperties": false
        }
      }
    }
  ]
}

Erros possíveis, lista não exaustiva: BAD_REQUEST, UNAUTHORIZED, SCOPE_DENIED, NOT_FOUND, RATE_LIMITED, UPSTREAM_ERROR, UPSTREAM_INVALID_RESPONSE, UPSTREAM_TIMEOUT, NETWORK_ERROR, CANCELLED, FORBIDDEN, INVALID_ARGUMENT, CONFIRMATION_REQUIRED, IDEMPOTENCY_KEY_INVALID, IDEMPOTENCY_PAYLOAD_MISMATCH, IDEMPOTENCY_IN_PROGRESS, STATE_CONFLICT, REQUIRED_FIELDS_MISSING, AUTHORIZATION_UNAVAILABLE, VALIDATION_UNAVAILABLE, TRANSITION_UNAVAILABLE, TRANSITION_RESULT_UNKNOWN, ASSIGNEE_AMBIGUOUS, ASSIGNEE_NOT_FOUND, ASSIGNEE_NOT_AVAILABLE.

summarize_conversationGerar resumo rastreável da conversa

IA sem envio

Gera resumo com fatos, inferências e referências de origem. Pode consumir IA; não envia mensagens e não transcreve mídia.

Escopos OAuth: bob:consult.

Parâmetros de summarize_conversation
NomeObrigatórioDescrição
conversation_idSimUUID da conversa autorizada a resumir.
Schema de entrada e limites
{
  "type": "object",
  "properties": {
    "conversation_id": {
      "type": "string",
      "format": "uuid"
    }
  },
  "required": [
    "conversation_id"
  ],
  "additionalProperties": false
}
Schema de saída
{
  "type": "object",
  "properties": {
    "schema_version": {
      "const": 1
    },
    "ok": {
      "type": "boolean"
    },
    "operation": {
      "const": "summarize_conversation"
    },
    "request_id": {
      "type": "string",
      "format": "uuid"
    },
    "effects": {
      "const": "ai_usage_only"
    },
    "data": {
      "type": [
        "object",
        "null"
      ]
    },
    "error": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "code": {
              "type": "string",
              "minLength": 2,
              "maxLength": 64,
              "pattern": "^[A-Z][A-Z0-9_]+$"
            },
            "message": {
              "type": "string",
              "minLength": 1,
              "maxLength": 2048,
              "pattern": "^\\s*\\S[\\s\\S]*$"
            },
            "retryable": {
              "type": "boolean"
            },
            "outcome": {
              "enum": [
                "not_started",
                "rejected",
                "failed",
                "unknown"
              ]
            }
          },
          "required": [
            "code",
            "message",
            "retryable",
            "outcome"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "schema_version",
    "ok",
    "operation",
    "request_id",
    "effects",
    "data",
    "error"
  ],
  "additionalProperties": false,
  "oneOf": [
    {
      "properties": {
        "ok": {
          "const": true
        },
        "data": {
          "type": "object",
          "properties": {
            "conversation_id": {
              "type": "string",
              "format": "uuid"
            },
            "summary": {
              "type": "string",
              "minLength": 1,
              "maxLength": 4000,
              "pattern": "^\\s*\\S[\\s\\S]*$"
            },
            "important_facts": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1200,
                    "pattern": "^\\s*\\S[\\s\\S]*$"
                  },
                  "source_message_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "maxItems": 5,
                    "minItems": 1,
                    "uniqueItems": true
                  }
                },
                "required": [
                  "text",
                  "source_message_ids"
                ],
                "additionalProperties": false
              },
              "maxItems": 10,
              "minItems": 0
            },
            "inferences": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1200,
                    "pattern": "^\\s*\\S[\\s\\S]*$"
                  },
                  "source_message_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "maxItems": 5,
                    "minItems": 1,
                    "uniqueItems": true
                  }
                },
                "required": [
                  "text",
                  "source_message_ids"
                ],
                "additionalProperties": false
              },
              "maxItems": 10,
              "minItems": 0
            },
            "customer_intent": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "text": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 1200,
                      "pattern": "^\\s*\\S[\\s\\S]*$"
                    },
                    "source_message_ids": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "maxItems": 5,
                      "minItems": 1,
                      "uniqueItems": true
                    }
                  },
                  "required": [
                    "text",
                    "source_message_ids"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            },
            "pending_questions": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1200,
                    "pattern": "^\\s*\\S[\\s\\S]*$"
                  },
                  "source_message_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "maxItems": 5,
                    "minItems": 1,
                    "uniqueItems": true
                  }
                },
                "required": [
                  "text",
                  "source_message_ids"
                ],
                "additionalProperties": false
              },
              "maxItems": 10,
              "minItems": 0
            },
            "commitments": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1200,
                    "pattern": "^\\s*\\S[\\s\\S]*$"
                  },
                  "source_message_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "maxItems": 5,
                    "minItems": 1,
                    "uniqueItems": true
                  }
                },
                "required": [
                  "text",
                  "source_message_ids"
                ],
                "additionalProperties": false
              },
              "maxItems": 10,
              "minItems": 0
            },
            "next_actions": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1200,
                    "pattern": "^\\s*\\S[\\s\\S]*$"
                  },
                  "source_message_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "maxItems": 5,
                    "minItems": 1,
                    "uniqueItems": true
                  }
                },
                "required": [
                  "text",
                  "source_message_ids"
                ],
                "additionalProperties": false
              },
              "maxItems": 10,
              "minItems": 0
            },
            "context": {
              "type": "object",
              "properties": {
                "message_count": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 50
                },
                "character_count": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 24000
                },
                "truncated": {
                  "type": "boolean"
                },
                "has_older_messages": {
                  "type": "boolean"
                },
                "source_message_ids": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "maxItems": 50,
                  "minItems": 0,
                  "uniqueItems": true
                },
                "snapshot_last_message_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "snapshot_last_message_at": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "unavailable_media_count": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 50
                }
              },
              "required": [
                "message_count",
                "character_count",
                "truncated",
                "has_older_messages",
                "source_message_ids",
                "snapshot_last_message_id",
                "snapshot_last_message_at",
                "unavailable_media_count"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "conversation_id",
            "summary",
            "important_facts",
            "inferences",
            "customer_intent",
            "pending_questions",
            "commitments",
            "next_actions",
            "context"
          ],
          "additionalProperties": false
        },
        "error": {
          "type": "null"
        }
      }
    },
    {
      "properties": {
        "ok": {
          "const": false
        },
        "data": {
          "type": [
            "object",
            "null"
          ]
        },
        "error": {
          "type": "object",
          "properties": {
            "code": {
              "type": "string",
              "minLength": 2,
              "maxLength": 64,
              "pattern": "^[A-Z][A-Z0-9_]+$"
            },
            "message": {
              "type": "string",
              "minLength": 1,
              "maxLength": 2048,
              "pattern": "^\\s*\\S[\\s\\S]*$"
            },
            "retryable": {
              "type": "boolean"
            },
            "outcome": {
              "enum": [
                "not_started",
                "rejected",
                "failed",
                "unknown"
              ]
            }
          },
          "required": [
            "code",
            "message",
            "retryable",
            "outcome"
          ],
          "additionalProperties": false
        }
      }
    }
  ]
}

Erros possíveis, lista não exaustiva: BAD_REQUEST, UNAUTHORIZED, AUTH_MODE_UNSUPPORTED, SCOPE_DENIED, BOB_PERMISSION_DENIED, NOT_FOUND, RATE_LIMITED, CONTEXT_UNAVAILABLE, AI_NOT_CONFIGURED, AI_DISABLED, AI_INVALID_RESPONSE, AI_TIMEOUT, AI_UNAVAILABLE, BOB_LIMIT_EXCEEDED, CANCELLED.

draft_replyGerar rascunho que exige aprovação

IA sem envio

Gera rascunho com status draft e requires_approval:true. Pode consumir IA, mas não envia nem modifica a conversa.

Escopos OAuth: bob:consult.

Parâmetros de draft_reply
NomeObrigatórioDescrição
conversation_idSimUUID da conversa autorizada usada como contexto.
instructionNãoOrientação autenticada opcional para o rascunho, com até 2.000 caracteres; não autoriza envio.
Schema de entrada e limites
{
  "type": "object",
  "properties": {
    "conversation_id": {
      "type": "string",
      "format": "uuid"
    },
    "instruction": {
      "type": "string",
      "minLength": 1,
      "maxLength": 2000,
      "pattern": "^\\s*\\S[\\s\\S]*$"
    }
  },
  "required": [
    "conversation_id"
  ],
  "additionalProperties": false
}
Schema de saída
{
  "type": "object",
  "properties": {
    "schema_version": {
      "const": 1
    },
    "ok": {
      "type": "boolean"
    },
    "operation": {
      "const": "draft_reply"
    },
    "request_id": {
      "type": "string",
      "format": "uuid"
    },
    "effects": {
      "const": "ai_usage_only"
    },
    "data": {
      "type": [
        "object",
        "null"
      ]
    },
    "error": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "code": {
              "type": "string",
              "minLength": 2,
              "maxLength": 64,
              "pattern": "^[A-Z][A-Z0-9_]+$"
            },
            "message": {
              "type": "string",
              "minLength": 1,
              "maxLength": 2048,
              "pattern": "^\\s*\\S[\\s\\S]*$"
            },
            "retryable": {
              "type": "boolean"
            },
            "outcome": {
              "enum": [
                "not_started",
                "rejected",
                "failed",
                "unknown"
              ]
            }
          },
          "required": [
            "code",
            "message",
            "retryable",
            "outcome"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "schema_version",
    "ok",
    "operation",
    "request_id",
    "effects",
    "data",
    "error"
  ],
  "additionalProperties": false,
  "oneOf": [
    {
      "properties": {
        "ok": {
          "const": true
        },
        "data": {
          "type": "object",
          "properties": {
            "conversation_id": {
              "type": "string",
              "format": "uuid"
            },
            "draft": {
              "type": "string",
              "minLength": 1,
              "maxLength": 4000,
              "pattern": "^\\s*\\S[\\s\\S]*$"
            },
            "status": {
              "const": "draft"
            },
            "requires_approval": {
              "const": true
            },
            "source_message_ids": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid"
              },
              "maxItems": 50,
              "minItems": 0,
              "uniqueItems": true
            },
            "warnings": {
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1,
                "maxLength": 300,
                "pattern": "^\\s*\\S[\\s\\S]*$"
              },
              "maxItems": 10,
              "minItems": 0
            },
            "context": {
              "type": "object",
              "properties": {
                "message_count": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 50
                },
                "character_count": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 24000
                },
                "truncated": {
                  "type": "boolean"
                },
                "has_older_messages": {
                  "type": "boolean"
                },
                "source_message_ids": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "maxItems": 50,
                  "minItems": 0,
                  "uniqueItems": true
                },
                "snapshot_last_message_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "snapshot_last_message_at": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "unavailable_media_count": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 50
                }
              },
              "required": [
                "message_count",
                "character_count",
                "truncated",
                "has_older_messages",
                "source_message_ids",
                "snapshot_last_message_id",
                "snapshot_last_message_at",
                "unavailable_media_count"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "conversation_id",
            "draft",
            "status",
            "requires_approval",
            "source_message_ids",
            "warnings",
            "context"
          ],
          "additionalProperties": false
        },
        "error": {
          "type": "null"
        }
      }
    },
    {
      "properties": {
        "ok": {
          "const": false
        },
        "data": {
          "type": [
            "object",
            "null"
          ]
        },
        "error": {
          "type": "object",
          "properties": {
            "code": {
              "type": "string",
              "minLength": 2,
              "maxLength": 64,
              "pattern": "^[A-Z][A-Z0-9_]+$"
            },
            "message": {
              "type": "string",
              "minLength": 1,
              "maxLength": 2048,
              "pattern": "^\\s*\\S[\\s\\S]*$"
            },
            "retryable": {
              "type": "boolean"
            },
            "outcome": {
              "enum": [
                "not_started",
                "rejected",
                "failed",
                "unknown"
              ]
            }
          },
          "required": [
            "code",
            "message",
            "retryable",
            "outcome"
          ],
          "additionalProperties": false
        }
      }
    }
  ]
}

Erros possíveis, lista não exaustiva: BAD_REQUEST, UNAUTHORIZED, AUTH_MODE_UNSUPPORTED, SCOPE_DENIED, BOB_PERMISSION_DENIED, NOT_FOUND, RATE_LIMITED, CONTEXT_UNAVAILABLE, AI_NOT_CONFIGURED, AI_DISABLED, AI_INVALID_RESPONSE, AI_TIMEOUT, AI_UNAVAILABLE, BOB_LIMIT_EXCEEDED, CANCELLED.

Exemplo sintético, não executado

Entrada

{
  "conversation_id": "66666666-6666-4666-8666-666666666666",
  "instruction": "Seja breve e não prometa prazo."
}

Saída ilustrativa; não demonstra uma execução real.

{
  "schema_version": 1,
  "ok": true,
  "operation": "draft_reply",
  "request_id": "44444444-4444-4444-8444-444444444454",
  "effects": "ai_usage_only",
  "data": {
    "conversation_id": "66666666-6666-4666-8666-666666666666",
    "draft": "Rascunho sintético para revisão humana.",
    "status": "draft",
    "requires_approval": true,
    "source_message_ids": [],
    "warnings": [],
    "context": {
      "message_count": 0,
      "character_count": 0,
      "truncated": false,
      "has_older_messages": false,
      "source_message_ids": [],
      "snapshot_last_message_id": null,
      "snapshot_last_message_at": null,
      "unavailable_media_count": 0
    }
  },
  "error": null
}
draft_reply_batchGerar até cinco rascunhos isolados

IA sem envio

Gera até cinco rascunhos em contextos separados, com sucesso ou erro por item. Todos exigem aprovação e nenhum é enviado.

Escopos OAuth: bob:consult.

Parâmetros de draft_reply_batch
NomeObrigatórioDescrição
conversation_idsSimDe 1 a 5 UUIDs únicos de conversas; todos são autorizados antes de consumir IA.
instructionNãoOrientação autenticada opcional aplicada separadamente a cada conversa; não autoriza envio.
Schema de entrada e limites
{
  "type": "object",
  "properties": {
    "conversation_ids": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "uuid"
      },
      "maxItems": 5,
      "minItems": 1,
      "uniqueItems": true
    },
    "instruction": {
      "type": "string",
      "minLength": 1,
      "maxLength": 2000,
      "pattern": "^\\s*\\S[\\s\\S]*$"
    }
  },
  "required": [
    "conversation_ids"
  ],
  "additionalProperties": false
}
Schema de saída
{
  "type": "object",
  "properties": {
    "schema_version": {
      "const": 1
    },
    "ok": {
      "type": "boolean"
    },
    "operation": {
      "const": "draft_reply_batch"
    },
    "request_id": {
      "type": "string",
      "format": "uuid"
    },
    "effects": {
      "const": "ai_usage_only"
    },
    "data": {
      "type": [
        "object",
        "null"
      ]
    },
    "error": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "code": {
              "type": "string",
              "minLength": 2,
              "maxLength": 64,
              "pattern": "^[A-Z][A-Z0-9_]+$"
            },
            "message": {
              "type": "string",
              "minLength": 1,
              "maxLength": 2048,
              "pattern": "^\\s*\\S[\\s\\S]*$"
            },
            "retryable": {
              "type": "boolean"
            },
            "outcome": {
              "enum": [
                "not_started",
                "rejected",
                "failed",
                "unknown"
              ]
            }
          },
          "required": [
            "code",
            "message",
            "retryable",
            "outcome"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "schema_version",
    "ok",
    "operation",
    "request_id",
    "effects",
    "data",
    "error"
  ],
  "additionalProperties": false,
  "oneOf": [
    {
      "properties": {
        "ok": {
          "const": true
        },
        "data": {
          "type": "object",
          "properties": {
            "results": {
              "type": "array",
              "items": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "conversation_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "ok": {
                        "const": true
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "conversation_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "draft": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 4000,
                            "pattern": "^\\s*\\S[\\s\\S]*$"
                          },
                          "status": {
                            "const": "draft"
                          },
                          "requires_approval": {
                            "const": true
                          },
                          "source_message_ids": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "maxItems": 50,
                            "minItems": 0,
                            "uniqueItems": true
                          },
                          "warnings": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 300,
                              "pattern": "^\\s*\\S[\\s\\S]*$"
                            },
                            "maxItems": 10,
                            "minItems": 0
                          },
                          "context": {
                            "type": "object",
                            "properties": {
                              "message_count": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 50
                              },
                              "character_count": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 24000
                              },
                              "truncated": {
                                "type": "boolean"
                              },
                              "has_older_messages": {
                                "type": "boolean"
                              },
                              "source_message_ids": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "maxItems": 50,
                                "minItems": 0,
                                "uniqueItems": true
                              },
                              "snapshot_last_message_id": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "snapshot_last_message_at": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "format": "date-time"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "unavailable_media_count": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 50
                              }
                            },
                            "required": [
                              "message_count",
                              "character_count",
                              "truncated",
                              "has_older_messages",
                              "source_message_ids",
                              "snapshot_last_message_id",
                              "snapshot_last_message_at",
                              "unavailable_media_count"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "conversation_id",
                          "draft",
                          "status",
                          "requires_approval",
                          "source_message_ids",
                          "warnings",
                          "context"
                        ],
                        "additionalProperties": false
                      },
                      "error": {
                        "type": "null"
                      }
                    },
                    "required": [
                      "conversation_id",
                      "ok",
                      "data",
                      "error"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "conversation_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "ok": {
                        "const": false
                      },
                      "data": {
                        "type": "null"
                      },
                      "error": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string",
                            "minLength": 2,
                            "maxLength": 64,
                            "pattern": "^[A-Z][A-Z0-9_]+$"
                          },
                          "message": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 2048,
                            "pattern": "^\\s*\\S[\\s\\S]*$"
                          },
                          "retryable": {
                            "type": "boolean"
                          },
                          "outcome": {
                            "enum": [
                              "not_started",
                              "rejected",
                              "failed",
                              "unknown"
                            ]
                          }
                        },
                        "required": [
                          "code",
                          "message",
                          "retryable",
                          "outcome"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "conversation_id",
                      "ok",
                      "data",
                      "error"
                    ],
                    "additionalProperties": false
                  }
                ]
              },
              "maxItems": 5,
              "minItems": 1
            }
          },
          "required": [
            "results"
          ],
          "additionalProperties": false
        },
        "error": {
          "type": "null"
        }
      }
    },
    {
      "properties": {
        "ok": {
          "const": false
        },
        "data": {
          "type": [
            "object",
            "null"
          ]
        },
        "error": {
          "type": "object",
          "properties": {
            "code": {
              "type": "string",
              "minLength": 2,
              "maxLength": 64,
              "pattern": "^[A-Z][A-Z0-9_]+$"
            },
            "message": {
              "type": "string",
              "minLength": 1,
              "maxLength": 2048,
              "pattern": "^\\s*\\S[\\s\\S]*$"
            },
            "retryable": {
              "type": "boolean"
            },
            "outcome": {
              "enum": [
                "not_started",
                "rejected",
                "failed",
                "unknown"
              ]
            }
          },
          "required": [
            "code",
            "message",
            "retryable",
            "outcome"
          ],
          "additionalProperties": false
        }
      }
    }
  ]
}

Erros possíveis, lista não exaustiva: BAD_REQUEST, UNAUTHORIZED, AUTH_MODE_UNSUPPORTED, SCOPE_DENIED, BOB_PERMISSION_DENIED, NOT_FOUND, RATE_LIMITED, CONTEXT_UNAVAILABLE, AI_NOT_CONFIGURED, AI_DISABLED, AI_INVALID_RESPONSE, AI_TIMEOUT, AI_UNAVAILABLE, BOB_LIMIT_EXCEEDED, CANCELLED.

check_resolutionVerificar impedimentos sem provar resolução

Leitura

Consulta impedimentos com advisory:true e resolution_proven:false. Não consome IA, não envia e não resolve a conversa.

Escopos OAuth: bob:consult.

Parâmetros de check_resolution
NomeObrigatórioDescrição
conversation_idSimUUID da conversa autorizada a verificar.
Schema de entrada e limites
{
  "type": "object",
  "properties": {
    "conversation_id": {
      "type": "string",
      "format": "uuid"
    }
  },
  "required": [
    "conversation_id"
  ],
  "additionalProperties": false
}
Schema de saída
{
  "type": "object",
  "properties": {
    "schema_version": {
      "const": 1
    },
    "ok": {
      "type": "boolean"
    },
    "operation": {
      "const": "check_resolution"
    },
    "request_id": {
      "type": "string",
      "format": "uuid"
    },
    "effects": {
      "const": "none"
    },
    "data": {
      "type": [
        "object",
        "null"
      ]
    },
    "error": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "code": {
              "type": "string",
              "minLength": 2,
              "maxLength": 64,
              "pattern": "^[A-Z][A-Z0-9_]+$"
            },
            "message": {
              "type": "string",
              "minLength": 1,
              "maxLength": 2048,
              "pattern": "^\\s*\\S[\\s\\S]*$"
            },
            "retryable": {
              "type": "boolean"
            },
            "outcome": {
              "enum": [
                "not_started",
                "rejected",
                "failed",
                "unknown"
              ]
            }
          },
          "required": [
            "code",
            "message",
            "retryable",
            "outcome"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "schema_version",
    "ok",
    "operation",
    "request_id",
    "effects",
    "data",
    "error"
  ],
  "additionalProperties": false,
  "oneOf": [
    {
      "properties": {
        "ok": {
          "const": true
        },
        "data": {
          "type": "object",
          "properties": {
            "conversation_id": {
              "type": "string",
              "format": "uuid"
            },
            "advisory": {
              "const": true
            },
            "resolution_proven": {
              "const": false
            },
            "blocked": {
              "type": "boolean"
            },
            "missing_fields": {
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1,
                "maxLength": 300,
                "pattern": "^\\s*\\S[\\s\\S]*$"
              },
              "maxItems": 50,
              "minItems": 0
            },
            "warnings": {
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1,
                "maxLength": 300,
                "pattern": "^\\s*\\S[\\s\\S]*$"
              },
              "maxItems": 10,
              "minItems": 0
            },
            "context": {
              "type": "object",
              "properties": {
                "message_count": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 50
                },
                "character_count": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 24000
                },
                "truncated": {
                  "type": "boolean"
                },
                "has_older_messages": {
                  "type": "boolean"
                },
                "source_message_ids": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "maxItems": 50,
                  "minItems": 0,
                  "uniqueItems": true
                },
                "snapshot_last_message_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "snapshot_last_message_at": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "unavailable_media_count": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 50
                }
              },
              "required": [
                "message_count",
                "character_count",
                "truncated",
                "has_older_messages",
                "source_message_ids",
                "snapshot_last_message_id",
                "snapshot_last_message_at",
                "unavailable_media_count"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "conversation_id",
            "advisory",
            "resolution_proven",
            "blocked",
            "missing_fields",
            "warnings",
            "context"
          ],
          "additionalProperties": false
        },
        "error": {
          "type": "null"
        }
      }
    },
    {
      "properties": {
        "ok": {
          "const": false
        },
        "data": {
          "type": [
            "object",
            "null"
          ]
        },
        "error": {
          "type": "object",
          "properties": {
            "code": {
              "type": "string",
              "minLength": 2,
              "maxLength": 64,
              "pattern": "^[A-Z][A-Z0-9_]+$"
            },
            "message": {
              "type": "string",
              "minLength": 1,
              "maxLength": 2048,
              "pattern": "^\\s*\\S[\\s\\S]*$"
            },
            "retryable": {
              "type": "boolean"
            },
            "outcome": {
              "enum": [
                "not_started",
                "rejected",
                "failed",
                "unknown"
              ]
            }
          },
          "required": [
            "code",
            "message",
            "retryable",
            "outcome"
          ],
          "additionalProperties": false
        }
      }
    }
  ]
}

Erros possíveis, lista não exaustiva: BAD_REQUEST, UNAUTHORIZED, AUTH_MODE_UNSUPPORTED, SCOPE_DENIED, BOB_PERMISSION_DENIED, NOT_FOUND, RATE_LIMITED, CONTEXT_UNAVAILABLE, CANCELLED.