Message context
get_message_contextRetrieve messages before and after a specific WhatsApp message to understand conversation context and surrounding replies.
Instructions
Get the messages before and after a given message in its chat.
Tool 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": {
"message_id": "<message_id>"
},
"name": "get_message_context"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| after | No | messages to include after (default 5) | |
| before | No | messages to include before (default 5) | |
| chat_jid | No | chat of the message; recommended, ids are only unique per chat | |
| message_id | Yes | id of the message (from list_messages) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| after | Yes | messages after the target, oldest first | |
| before | Yes | messages before the target, oldest first | |
| message | Yes |