search_messages
Need to locate a Slack message? Search with text, channel, user, date filters and paginate results.
Instructions
Search for messages matching a query.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Search text. Supports Slack modifiers like ``in:#channel``, ``from:@user``, and ``before:2024-01-31``. | |
| count | No | Results per page (default 20, max 100). | |
| cursor | No | Pagination cursor from ``response_metadata.next_cursor`` in a prior response (alternative to ``page``). | |
| highlight | No | Wrap matched terms in highlight markers in the response. | |
| page | No | 1-based page number to return. | |
| sort | No | Sort by ``score`` (relevance, default) or ``timestamp`` (recency). | |
| sort_dir | No | Sort direction, ``asc`` or ``desc`` (default ``desc``). | |
| team_id | No | Encoded team ID to scope the search to (for org-wide tokens). | |
| detailed | No | Return the full, uncompacted Slack response when True. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||