Home / Servers / Slack API / search_messages
Searches for messages matching a query.
An MCP tool from the Slack API server, hosted on mcp.hjlabs.in.
Searches for messages matching a query. [GET /search.messages]
Name on the gateway: slack_api__search_messages · read-only.
Parameters
| Name | Type | Description |
|---|---|---|
token required | string | Authentication token. Requires scope: search:read |
count | integer | Pass the number of results you want per "page". Maximum of 100. |
highlight | boolean | Pass a value of true to enable query highlight markers (see below). |
page | integer | page parameter |
query required | string | Search query. |
sort | string | Return matches sorted by either score or timestamp. |
sort_dir | string | Change sort direction to ascending (asc) or descending (desc). |
How to call it
Through the Smart Gateway, any client can run it by name with call_tool, or let the gateway find it with search_tools:
{
"name": "slack_api__search_messages",
"arguments": {
"token": "…",
"query": "…"
}
}Or connect the Slack API server directly, which lists 174 tools including this one:
claude mcp add --transport http hj-slack-api https://mcp.hjlabs.in/mcp/slack-api \
--header "Authorization: Bearer YOUR_API_KEY"Try asking
Use the searches for messages matching a query. tool with token set to ….
More from Slack API
- Approve an app for installation on a workspace.
- List approved apps for an org or workspace.
- List app requests for a team/workspace.
- Restrict an app for installation on a workspace.
- List restricted apps for an org or workspace.
- Archive a public or private channel.
- Convert a public channel to a private channel.
- Create a public or private channel-based conversation.
- All 174