slack_search_messages
Find Slack messages by keywords, user, date range, or channel using targeted search filters.
Instructions
Search for messages with specific criteria/filters. Use this when: 1) You need to find messages from a specific user, 2) You need messages from a specific date range, 3) You need to search by keywords, 4) You want to filter by channel. This tool is optimized for targeted searches. For general channel browsing without filters, use slack_get_channel_history instead.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "slack_search_messages"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| on | No | Search for messages on this specific date (YYYY-MM-DD) | |
| page | No | Page number of results (max 100) | |
| sort | No | Search result sort method (score or timestamp) | score |
| after | No | Search for messages after this date (YYYY-MM-DD) | |
| count | No | Number of results per page (max 100) | |
| query | No | Basic search query text only. Use this tool when you need to: search by keywords, filter by user/date/channel, find specific messages with criteria. For general channel browsing without filters, use slack_get_channel_history instead. Do NOT include modifiers like "from:", "in:", etc. - use the dedicated fields instead. | |
| before | No | Search for messages before this date (YYYY-MM-DD) | |
| during | No | Search for messages during a specific time period (e.g., "July", "2023", "last week") | |
| sort_dir | No | Sort direction (ascending or descending) | desc |
| from_user | No | Search for messages from a specific user. IMPORTANT: You cannot use display names or usernames directly. First use slack_get_users to find the user by name and get their user ID (e.g., "U1234567"), then use that ID here. | |
| highlight | No | Enable highlighting of search results | |
| in_channel | No | Search within a specific channel. Must be a Slack channel ID (e.g., "C1234567"). Use slack_list_channels to find channel IDs first. |