discord_search_messages
Find Discord messages containing a phrase, optionally by a specific author. Scans recent channel history locally since bot search API is unavailable.
Instructions
Find messages in a channel containing a phrase, optionally by one author.
Discord's search API is not available to bots, so this scans the most recent
`max_scan` messages page by page (100 per API call) and filters locally. For "what
did X say about Y last week" this is the tool; for older history raise max_scan.
Returns: Matching messages (Markdown or JSON, same shape as discord_read_messages) plus
how many messages were scanned and the oldest one reached.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Max matches to return. | |
| query | Yes | Case-insensitive substring to look for in message text. | |
| max_scan | No | How many recent messages to scan, newest first. Larger = slower. | |
| author_id | No | Only messages by this user. | |
| channel_id | Yes | Channel, thread, or DM channel ID. | |
| response_format | No | 'markdown' for reading, 'json' for full structured data. | markdown |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |