| name | slack-msg |
| description | Read and respond to Slack messages as the authenticated user.
Supports: channels, message history, threads, search, send, reply, DMs.
Use when the user wants to check Slack, read messages, or respond to conversations.
|
| invocation | user |
Slack Messaging
Read and respond to Slack messages using slack-api — a shell wrapper around the Slack Web API using your personal user token.
Prerequisites
Verify the tool works:
slack-api channels public_channel
If this fails with a token error, follow the setup in README.md.
Commands
| Command | Purpose |
|---|
slack-api channels | List all channels, DMs, groups |
slack-api channels public_channel | List only public channels |
slack-api history <channel_id> [limit] | Read recent messages (default: 20) |
slack-api thread <channel_id> <ts> | Read thread replies |
slack-api search "<query>" [count] | Search messages workspace-wide |
slack-api send <channel_id> "<text>" | Send a message |
slack-api reply <channel_id> <ts> "<text>" | Reply in a thread |
slack-api users | List workspace members |
slack-api userinfo <user_id> | Get a user's profile |
slack-api dm-open <user_id> | Open a DM channel with someone |
Workflow
Reading messages
- List channels to find the target:
slack-api channels
- Read recent messages:
slack-api history <channel_id>
- If a message has
reply_count > 0, read the thread: slack-api thread <channel_id> <ts>
- Resolve user IDs to names:
slack-api userinfo <user_id>
Responding
- Read the conversation context first (history + thread)
- Draft a response and show it to the user for approval
- Only after explicit approval, send:
slack-api send <channel_id> "<text>" or slack-api reply <channel_id> <ts> "<text>"
Searching
slack-api search "deployment issue" 5
Returns matches with channel, user, text, and permalink.
Safety Rules
- NEVER send a message without showing the draft and getting explicit user approval
- Read operations are always safe to execute freely
- When replying, always read the full thread first for context
- Messages are sent as the authenticated user — they appear as coming from you
- Quote the message text argument to preserve spaces and special characters
Output Format
All commands return JSON. Message timestamps (ts) serve as unique message IDs — use them for threading and replies.