discord_search_messages
Search recent messages in a Discord channel or thread by keyword using case-insensitive substring matching, scanning up to the last 100 messages.
Instructions
Keyword search over a channel's recent messages using case-insensitive substring matching. Scans only up to the last 100 messages; it does not search full history. Returns { matches: [...] } with id, author, content, timestamp, and the text of any embeds. Matching checks message content only, so a word that appears only in an embed is not found. Requires the View Channel and Read Message History permissions; without Read Message History an empty scan fails with an error naming the permission. Use discord_read_messages to fetch recent messages without filtering. To search full history, in one channel or the whole server, use discord_search_guild_messages.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"channel_id": "<channel_id>",
"keyword": "<keyword>"
},
"name": "discord_search_messages"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Max number of recent messages to scan (1–100). Default 100. | |
| keyword | Yes | Case-insensitive substring to match within message content. | |
| channel_id | Yes | ID (snowflake) of the channel or thread to search. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| matches | Yes |