search_messages
Search message bodies across all conversations, filtered by chat, sender, or date range. Reads one chat newest-first when no search term is given.
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.
In Claude the result renders as an inline card, so don't repeat its contents in your reply — a one-line summary or the answer to the user's question is enough.
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 |