search_messages
Find specific messages in a GroupMe conversation by text or sender name, scanning history to avoid manual paging.
Instructions
Search one conversation's message history for matching messages.
Use this to find specific messages ("who mentioned pizza?", "what did
Ada say last week?") instead of paging manually with read_messages.
GroupMe has no search API, so this scans backwards from the newest
message, matching query against message text and sender_name
against sender names (both case-insensitive substrings), until limit
matches are found, the oldest message is reached, or
max_messages_scanned messages have been examined. The result reports
exactly how far the scan got — check oldest_message_reached and
note before concluding something was never said.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Stop after this many matches (1-100). | |
| query | Yes | Text to look for in message text. May be empty only when ``sender_name`` is given (a sender-only search). | |
| sender_name | No | Only match messages whose sender's display name contains this. | |
| conversation | Yes | Which conversation to search: ``{"kind": "group", "group_id": ...}`` or ``{"kind": "direct", "other_user_id": ...}`` (ids from ``list_conversations``). | |
| response_format | No | ``"concise"`` (default) for sender names, text, relative ages, and like counts; ``"detailed"`` adds sender ids, conversation ids, and ISO timestamps. | concise |
| max_messages_scanned | No | Stop after examining this many messages (1-5000); a hit cap is reported in ``note``, never silent. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | ||
| count | Yes | ||
| matches | Yes | ||
| next_before_id | No | ||
| messages_scanned | Yes | ||
| oldest_message_reached | Yes |