search_messages
Search message bodies across every conversation and all history, using filters like chat, date range, and sender to locate specific messages.
Instructions
Search message bodies across every conversation, over all history.
Backed by a local index of decoded message bodies, which is brought up to date automatically. The first search on a large history has to build that index and may take a while; later searches are fast.
Args:
query: Text to look for (case-insensitive substring match). Leave it
out to search on the filters alone — chat_id plus a date range
with no search term reads one conversation newest-first.
limit: Maximum messages to return (default 30).
chat_id: Restrict to one conversation from list_chats.
from_me: True for only messages you sent, False for only received.
after: Only messages at or after this time.
before: Only messages at or before this time.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| after | No | ||
| limit | No | ||
| query | No | ||
| before | No | ||
| chat_id | No | ||
| from_me | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | ||
| total | Yes | ||
| messages | No | ||
| truncated | No |