Search LinkedIn message history
search_linkedin_message_historyTool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"where_clause": "<where_clause>"
},
"name": "search_linkedin_message_history"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of results (default 50, max 200). Only override if the user says a specific number like "show me 10 messages". For vague quantities ("couple", "few", "recent"), omit this parameter to use the default. | |
| offset | No | Rows to skip for paging (default 0). When the result is truncated, re-call with offset += limit to fetch the next page. | |
| order_by | No | SQL ORDER BY clause (default: message_datetime DESC). | message_datetime DESC |
| on_behalf_of | No | A teammate's email, or an agency client's from list_agency_clients, to run this call in that account: their agents, settings, connected accounts, and credits. Omit it to act on your own account. | |
| where_clause | Yes | SQL WHERE clause (without WHERE keyword). Use ONLY these columns: provider, chat_id, sender_name, sender_provider_id, recipient_name, recipient_provider_id, content, message_datetime, reply_outcome (inbound replies only; 'interested' / 'meeting_booked' / 'not_interested' / 'neither' — the reply's classified outcome, NULL if it was never classified; to exclude a value, write reply_outcome IS DISTINCT FROM 'not_interested', which keeps the NULL rows), attachments (JSONB; `attachments != '[]'::jsonb` finds messages with files, and `attachments::text ILIKE '%deck%'` matches a document's file name). To read your thread with a person, match their provider_id alone: `sender_provider_id = '<id>' OR recipient_provider_id = '<id>'`. Keep their name out of that clause: a name ILIKE is a substring match, so it pulls in other people's threads (`'%Ana%Li%'` also matches "Diana Lim"). Match on a name only to find someone whose provider_id you don't have; when a hit's counterpart name is their full name, take it as theirs and re-read by that counterpart's provider_id. An empty result isn't proof of no prior contact: this local store holds only a bounded initial backfill from around when the account was connected, forward. When you need certainty, call `fetch_linkedin_messages_with_person` with their provider_id — it reads LinkedIn's full synced history live. |