Slack Search Messages
slack_search_messagesSearches Slack messages. Optionally restrict to a specific channel_id. A hit whose text is the marker "[body not included in this search result]" (with body_missing: true) DID match — its body was lost by the reader, not empty. Read it with slack_read_channel_messages on its channel_id; never report it to the user as an empty message. Direct messages come back as an unresolved id rather than a name; slack_list_channels maps ids to names.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Max results to return (default 50) | |
| query | Yes | Search text. Slack 4.50+ runs Slack's own search, as its search box does: it matches words, not a substring, so quote a phrase ("like this") to find it exactly. An older Slack is searched in its local cache as a case-insensitive substring. | |
| channel_id | No | Optional channel ID to restrict search |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | Present when something about the answer needs stating: bodies that did not survive the reader, unresolved channel names, or a genuine zero | |
| count | Yes | Number of results returned | |
| results | Yes | Matching messages, most recent first |