Conversations

ToolREST endpointAnnotations
search_workspace_conversationsPOST /v1/search/conversationsoptional write, non-destructive
list_conversationsGET /v1/conversationsread-only, idempotent
get_conversationGET /v1/conversations/{id}read-only, idempotent
update_conversationPATCH /v1/conversations/{id}write, non-destructive

search_workspace_conversations

Searches conversations by text, meaning, or both, with advanced filters, field projection, analytics, and CSV export. It fuses both signals with Reciprocal Rank Fusion (RRF) and deduplicates semantic chunks by conversation.

FieldTypeDefaultDescription
workspacestringWorkspace ID.
querystring, max 2000"*"Text query; it also powers semantic search unless variants are supplied.
semantic_queriesstring or string[]One semantic query or up to 5 variants.
modehybrid, lexical, or semantichybridUses both branches, lexical search only, or semantic search only.
filtersobject{}Date range, tags, platforms, topics, statuses, agents, channels, owners, and other filters.
pageinteger ≥ 11Requested page.
page_sizeinteger 1-10010Results per page.
candidate_limitinteger 25-1000250Fixed candidate window fused before pagination.
semantic_score_thresholdnumber 0-20.8Maximum semantic distance; lower means a stricter match.
rankingobject0.5/0.5, rrf_k: 60Lexical and semantic weights, plus the RRF constant.
responseobjectcompactFields and metadata to return.
export_csvboolean or objectfalseCreates a private CSV with a signed URL valid for 7 days.

The available fields inside filters are:

start_date, end_date, date_field, tags, platforms, topics, statuses, agents,
channel_ids, operations, owner_ids, conversation_ids, client_ids, phone_numbers,
has_phone, is_finished

tags can be a string/list or { any, all, none }. Other text filters accept a string or a list of up to 50 values. The default range covers the past 90 days by lastUpdate; use date_field: "creationDate" to filter by creation time.

Keep model context compact

The default response only includes:

id, contactName, platform, topic, tags, lastUpdate, snippet,
conversationUrl, score, sources

Use response.fields to select from:

id, conversationId, contactName, phoneNumber, email, platform, topic, tags,
status, agent, channelId, clientId, operation, owners, isFinished, creationDate,
lastUpdate, snippet, messages, conversationUrl, contactUrl, score, sources, scores

response.max_snippet_chars accepts 40-2000, and max_content_chars accepts 100-10000. You can also disable include_results, enable include_analytics, request include_engine_metadata, or create a temporary searchId with create_search_cache.

messages contains the available matching passage, not the conversation's complete history.

The model-facing text is a compact preview of up to 10 results and 7 columns; it never puts messages in that table. The complete JSON response, with every requested field, remains available in structuredContent.

Example

{
  "name": "search_workspace_conversations",
  "arguments": {
    "query": "customers who want to cancel because they were charged twice",
    "mode": "hybrid",
    "filters": {
      "start_date": "2026-07-01",
      "tags": { "any": ["cancellation", "billing"] },
      "platforms": ["whatsapp"]
    },
    "page_size": 10,
    "response": {
      "fields": ["id", "contactName", "topic", "snippet", "score", "sources"]
    }
  }
}

To create a file without filling context with results:

{
  "name": "search_workspace_conversations",
  "arguments": {
    "query": "cancellation request",
    "response": { "include_results": false },
    "export_csv": {
      "fields": ["id", "contactName", "phoneNumber", "topic", "lastUpdate"],
      "max_rows": 500
    }
  }
}

The preview adds a download link when export.url exists. The tool is not annotated as read-only because export_csv and create_search_cache are opt-in writes; search itself does not modify conversations.

Exports with snippet or messages support up to 100 rows; without those fields they support up to 1000, always within candidate_limit.

totalRelation: "exact" only appears for an untruncated lexical search. Hybrid and semantic results use lower_bound; inspect truncated and warnings as well. If one branch is unavailable, the other can continue.

See the complete endpoint contract for every field, limit, and response detail.


list_conversations

Lists workspace conversations. Each result includes the thread's unique id, which should be used to retrieve or update it.

id is the canonical document ID, conversationId identifies the chat thread, and clientId identifies the client. One client can have several threads. canSendDirectMessage can only be false on WhatsApp, Instagram, and Messenger/Facebook and is calculated from the latest user message; it is always true for internal Platica chats.

FieldTypeDefaultDescription
limit1-20050Conversations per workspace.
pageTokenstringnextPageToken cursor from the previous response. Recommended way to paginate; cannot be combined with offset.
offset≥ 00Legacy pagination. Capped at 100000.
channelIdstringFilters by a specific channel.
clientIdstringFilters by attributed client.
agentIdstringFilters by principal agent.
sortBy"lastUpdate" \| "creationDate"lastUpdate
sortDirection"asc" \| "desc"desc
tagsstring[] (max 10)Filters by tags.
dateFilterobject{ type: "specific"\|"range", date \| startDate \| endDate }.

get_conversation

Fetches one conversation by its canonical id, including the full message history. The conversationId argument keeps the legacy phone/shared-identifier behavior and may return several threads. Use list_client_conversations to group by client.

FieldTypeRequiredDescription
idstringyes¹Unique thread ID (recommended).
conversationIdstringyes¹Legacy fallback: conversationId or phone.
channelIdstringnoRestrict to a specific channel.

¹ Send either id or conversationId.


update_conversation

Updates owners (owners) and/or status (status) of one exact conversation. Use id; the legacy conversationId fallback remains available and may affect several threads.

FieldTypeRequiredDescription
idstringyes¹Unique thread ID (recommended).
conversationIdstringyes¹Legacy fallback: conversationId or phone.
workspacestringif multi-wsWorkspace ID.
channelIdstringnoLimit to a specific channel.
ownersstring[] (emails)one ofNew list of owners.
status"active" \| "finished" \| "expired" \| "spam"one ofNew status.

¹ Send either id or conversationId.

For internal chats, status: "active" reopens the thread. It also reactivates automatically when send_chat_message receives another message for its chat_* conversationId.

Example

{
  "name": "update_conversation",
  "arguments": {
    "id": "conversation_doc_id",
    "status": "finished",
    "owners": ["ana@miempresa.com"]
  }
}