messages_search_recent
Search recent messages in a Discord channel by keyword to quickly find a message without manual scrolling.
Instructions
Purpose: Substring-search recent messages in a channel.
When to use:
Locate a recently sent message by keyword without iterating manually.
When NOT to use:
Server-wide search → not supported by Discord REST. This tool only fans out the most recent N messages of ONE channel and filters client-side. For deep history, use external indexing.
Example: {channel_id:"111122223333444401", query:"deploy", limit:100}
Returns: {matches:[…], scanned_count, channel_id, query}. Structured matches remain raw Discord data; the human-readable MCP content response fences matched message text.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| after | No | Scan window: messages after this ID (newer) | |
| limit | No | Max recent messages to scan (1-100, default 100). NOT a result cap. | |
| query | Yes | Substring to match (case-insensitive) | |
| before | No | Scan window: messages before this ID (older) | |
| channel_id | Yes | Channel to scan |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||