Slack tool
The Slack tool gives an agent the Slack Web API behind a single action it picks per call — 28 actions for messaging, reactions, reading and managing channels, DMs, users/profiles, files, and workspace info. One credential: a Bot User OAuth token.
Connect Slack
- Go to api.slack.com/apps → Create New App → From scratch; name it and pick the workspace.
- Open OAuth & Permissions → Bot Token Scopes and add the scopes for what you want the bot to do (see checklist below).
- Install to Workspace → Allow.
- Copy the Bot User OAuth Token (starts with
xoxb-) and paste it into the tool's Bot User OAuth Token field.
xoxb-), not a user (xoxp-) or app-level (xapp-) token. Adding a scope later requires reinstalling the app.
Scope checklist
Add only what you need; each action the token's scopes don't cover returns a clean missing_scope error naming the scope.
- Post + react —
chat:write,chat:write.public,reactions:write,reactions:read - Read channels —
channels:read,channels:history,groups:read,groups:history; self-join:channels:join - Manage channels —
channels:manage,channels:write.topic,channels:write.invites - DMs —
im:write,im:history - Users —
users:read,users:read.email,users.profile:read - Files —
files:write,files:read - Workspace —
team:read,emoji:read
Capabilities
The agent picks one action per call (28 total), grouped by area:
- Messaging —
send_message(channel + text/blocks, optional thread reply),update_message(channel, ts),delete_message(channel, ts). - Reactions —
add_reaction/remove_reaction(channel, timestamp, name),get_reactions(channel, timestamp). - Channels (read) —
list_channels,get_channel,read_history,read_thread(channel, ts),join_channel. - Channels (manage) —
create_channel(name),archive_channel,rename_channel(channel, name),set_channel_topic,set_channel_purpose,invite_to_channel(channel, users). - DMs —
open_dm(users) → returns a DM channel id tosend_messageto. - Users —
list_users,get_user,get_user_profile,lookup_user_by_email(email). - Files —
upload_file(filename + content|file_url),list_files,get_file_info,delete_file. - Workspace —
get_team_info,list_emoji.
Field reference
- channel — a channel ID like
C0123ABCD, or a DM channel IDD0123…(fromlist_channels/open_dm). To message a person, use their user ID or open a DM first. - user / users — a user ID like
U0123ABCD(fromlist_users);usersis comma-separated (invite / DM). - ts — a message's timestamp ID (e.g.
1700000000.123456) — the message to edit/delete, or a thread parent. Returned astswhen you post. - name — for reactions, the emoji name without colons (e.g.
white_check_mark); for create/rename, the channel name (lowercase, hyphens, no spaces). - text / blocks / thread_ts — message text (Slack mrkdwn:
*bold*,<url|label>,<@U123>); optional Block Kit layout; reply in a thread by passing the parent's timestamp. - Channel management —
topic/purpose(≤250 chars),is_private(create a private channel). - Upload —
filename,content(inline text) orfile_url(public https to fetch),title,initial_comment. - Paging —
limit/cursor(next-page cursor fromresponse_metadata.next_cursor), andoldest/latest/inclusivefor history windows.
Common recipes
- Post an alert —
send_messageto#channel(the bot can post to any public channel without joining). - Escalate in a thread —
send_messagewiththread_tsset to the parent message. - DM a user —
open_dm→send_messageto the returned DM channel id. - Share a file/report —
upload_filewithcontentorfile_urland aninitial_comment. - Read recent messages for context —
read_history(the bot must be in the channel). - Spin up a project channel —
create_channel→invite_to_channelwith the team's user ids.
Permissions & troubleshooting
Post anywhere, read where invited: chat:write.public lets the bot post to any public channel without joining, but reading history and reacting require the bot to be in the channel — it can join_channel first (if channels:join is granted) or be invited with /invite @YourBot. Private channels always need an explicit invite. Channels can be archived, not deleted (Slack has no delete-channel API).
Slack returns HTTP 200 even on failure; the tool detects {"ok":false} and surfaces the Slack error code (in trace/debug panels):
not_in_channel→ the bot isn't a member; join or invite it.missing_scope(needs scope: …) → add the scope in OAuth & Permissions, then reinstall.channel_not_found/users_not_found/message_not_found→ wrong ID; fetch it fromlist_channels/list_usersfirst.cant_update_message/cant_delete_message→ the bot didn't author that message.rate_limited→ Slack throttling; retry later.
Classification & lifecycle
This is a read and write tool, and it can delete messages/files and archive channels. If you run it on an autonomous bot, set its safety classification to match. It's post-call-hook eligible (runs outside the LLM turn) — e.g. post a recap or escalate to a channel after a call.