@matimo/slack 0.1.0-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/definition.yaml +54 -0
- package/package.json +18 -0
- package/tools/README.md +215 -0
- package/tools/assets/icon.svg +9 -0
- package/tools/assets/logo-dark.svg +14 -0
- package/tools/assets/logo-light.svg +14 -0
- package/tools/assets/logo.svg +14 -0
- package/tools/get-user/definition.yaml +31 -0
- package/tools/list-channels/definition.yaml +46 -0
- package/tools/send-message/definition.yaml +30 -0
- package/tools/slack_add_reaction/definition.yaml +45 -0
- package/tools/slack_create_channel/definition.yaml +41 -0
- package/tools/slack_get_channel_history/definition.yaml +58 -0
- package/tools/slack_get_reactions/definition.yaml +36 -0
- package/tools/slack_get_thread_replies/definition.yaml +45 -0
- package/tools/slack_get_user_info/definition.yaml +32 -0
- package/tools/slack_join_channel/definition.yaml +35 -0
- package/tools/slack_reply_to_message/definition.yaml +49 -0
- package/tools/slack_search_messages/definition.yaml +46 -0
- package/tools/slack_send_channel_message/definition.yaml +34 -0
- package/tools/slack_send_dm/definition.yaml +37 -0
- package/tools/slack_set_channel_topic/definition.yaml +40 -0
- package/tools/slack_upload_file/definition.yaml +152 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 tallclub
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/definition.yaml
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Slack OAuth2 Provider Definition
|
|
2
|
+
#
|
|
3
|
+
# This file defines the OAuth2 configuration for Slack.
|
|
4
|
+
# All Slack tools reference this provider definition.
|
|
5
|
+
#
|
|
6
|
+
# Users can override endpoints via environment variables or runtime config.
|
|
7
|
+
|
|
8
|
+
name: slack-provider
|
|
9
|
+
type: provider
|
|
10
|
+
version: '1.0.0'
|
|
11
|
+
|
|
12
|
+
description: |
|
|
13
|
+
Slack OAuth2 Provider Configuration
|
|
14
|
+
|
|
15
|
+
All Slack tools use these endpoints for OAuth2 authentication.
|
|
16
|
+
|
|
17
|
+
Setup:
|
|
18
|
+
1. Go to Slack API: https://api.slack.com/apps
|
|
19
|
+
2. Create New App
|
|
20
|
+
3. Go to OAuth & Permissions
|
|
21
|
+
4. Set Redirect URLs to your callback URL
|
|
22
|
+
5. Copy Client ID and Client Secret
|
|
23
|
+
6. Set SLACK_CLIENT_ID and SLACK_CLIENT_SECRET environment variables
|
|
24
|
+
7. Set SLACK_REDIRECT_URI to your callback URL
|
|
25
|
+
|
|
26
|
+
provider:
|
|
27
|
+
name: slack
|
|
28
|
+
displayName: Slack
|
|
29
|
+
|
|
30
|
+
# OAuth2 Endpoints
|
|
31
|
+
endpoints:
|
|
32
|
+
authorizationUrl: https://slack.com/oauth/v2/authorize
|
|
33
|
+
tokenUrl: https://slack.com/api/oauth.v2.access
|
|
34
|
+
|
|
35
|
+
# Standard scopes for Slack API access
|
|
36
|
+
# Tools can override with their own scopes
|
|
37
|
+
defaultScopes:
|
|
38
|
+
- chat:write
|
|
39
|
+
- channels:read
|
|
40
|
+
- users:read
|
|
41
|
+
|
|
42
|
+
# Additional metadata
|
|
43
|
+
documentation: https://api.slack.com/authentication/oauth-v2
|
|
44
|
+
learnMore: https://api.slack.com/apps
|
|
45
|
+
|
|
46
|
+
# UI assets and branding for frontends
|
|
47
|
+
assets:
|
|
48
|
+
icon: assets/icon.svg
|
|
49
|
+
logo: assets/logo.svg
|
|
50
|
+
logo_light: assets/logo-light.svg
|
|
51
|
+
logo_dark: assets/logo-dark.svg
|
|
52
|
+
brand_color: '#4A154B'
|
|
53
|
+
homepage: 'https://slack.com'
|
|
54
|
+
alt: 'Slack'
|
package/package.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@matimo/slack",
|
|
3
|
+
"version": "0.1.0-alpha.4",
|
|
4
|
+
"description": "Slack workspace tools for Matimo",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"files": [
|
|
7
|
+
"tools",
|
|
8
|
+
"README.md",
|
|
9
|
+
"definition.yaml"
|
|
10
|
+
],
|
|
11
|
+
"peerDependencies": {
|
|
12
|
+
"matimo": "^0.1.0-alpha.4"
|
|
13
|
+
},
|
|
14
|
+
"devDependencies": {
|
|
15
|
+
"axios": "^1.13.4",
|
|
16
|
+
"@matimo/core": "0.1.0-alpha.4"
|
|
17
|
+
}
|
|
18
|
+
}
|
package/tools/README.md
ADDED
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
# Slack Tools - Complete Reference
|
|
2
|
+
|
|
3
|
+
This directory contains **19 Slack tools** covering all major Slack operations. All tools are built on official Slack Web API methods and fully documented.
|
|
4
|
+
|
|
5
|
+
## 📦 Available Tools (19 Total)
|
|
6
|
+
|
|
7
|
+
### Messaging Tools (4)
|
|
8
|
+
|
|
9
|
+
- **slack-send-message** - Post message to channel (chat.postMessage)
|
|
10
|
+
- **slack_send_channel_message** - Post message with markdown/blocks (chat.postMessage)
|
|
11
|
+
- **slack_reply_to_message** - Reply in thread (chat.postMessage with thread_ts)
|
|
12
|
+
- **slack_send_dm** - Send direct message (conversations.open + chat.postMessage)
|
|
13
|
+
|
|
14
|
+
### Channel Management (4)
|
|
15
|
+
|
|
16
|
+
- **slack-list-channels** - List all channels/DMs (conversations.list)
|
|
17
|
+
- **slack_create_channel** - Create public/private channel (conversations.create)
|
|
18
|
+
- **slack_join_channel** - Add bot to channel (conversations.join)
|
|
19
|
+
- **slack_set_channel_topic** - Update channel description (conversations.setTopic)
|
|
20
|
+
|
|
21
|
+
### File Management (3 - Modern API)
|
|
22
|
+
|
|
23
|
+
- **slack_upload_file** - Upload file to Slack (files.getUploadURLExternal - modern API)
|
|
24
|
+
- **slack_upload_file_v2** - Get upload URL for files (files.getUploadURLExternal)
|
|
25
|
+
- **slack_complete_file_upload** - Complete upload and share (files.completeUploadExternal)
|
|
26
|
+
|
|
27
|
+
### Message Reading (3)
|
|
28
|
+
|
|
29
|
+
- **slack_get_channel_history** - Get messages from channel (conversations.history)
|
|
30
|
+
- **slack_get_thread_replies** - Get thread replies (conversations.replies)
|
|
31
|
+
- **slack_search_messages** - Search message history (search.messages)
|
|
32
|
+
|
|
33
|
+
### Reactions (2)
|
|
34
|
+
|
|
35
|
+
- **slack_add_reaction** - Add emoji reaction (reactions.add)
|
|
36
|
+
- **slack_get_reactions** - Get reactions on message (reactions.get)
|
|
37
|
+
|
|
38
|
+
### User Info (2)
|
|
39
|
+
|
|
40
|
+
- **slack_get_user_info** - Get user details (users.info)
|
|
41
|
+
- **slack-get-user** - Alias of slack_get_user_info
|
|
42
|
+
|
|
43
|
+
## 🔗 API Reference
|
|
44
|
+
|
|
45
|
+
All tools are based on official Slack Web API methods. See [Slack API Documentation](https://docs.slack.dev/).
|
|
46
|
+
|
|
47
|
+
| Tool | Slack API Method | Scopes Required |
|
|
48
|
+
| -------------------------- | ------------------------------------ | -------------------- |
|
|
49
|
+
| slack-send-message | chat.postMessage | chat:write |
|
|
50
|
+
| slack_send_channel_message | chat.postMessage | chat:write |
|
|
51
|
+
| slack_reply_to_message | chat.postMessage | chat:write |
|
|
52
|
+
| slack_send_dm | conversations.open, chat.postMessage | im:write, chat:write |
|
|
53
|
+
| slack-list-channels | conversations.list | channels:read |
|
|
54
|
+
| slack_create_channel | conversations.create | channels:manage |
|
|
55
|
+
| slack_join_channel | conversations.join | channels:join |
|
|
56
|
+
| slack_set_channel_topic | conversations.setTopic | channels:write.topic |
|
|
57
|
+
| slack_upload_file | files.getUploadURLExternal | files:write |
|
|
58
|
+
| slack_upload_file_v2 | files.getUploadURLExternal | files:write |
|
|
59
|
+
| slack_complete_file_upload | files.completeUploadExternal | files:write |
|
|
60
|
+
| slack_get_channel_history | conversations.history | channels:history |
|
|
61
|
+
| slack_get_thread_replies | conversations.replies | channels:history |
|
|
62
|
+
| slack_search_messages | search.messages | search:read |
|
|
63
|
+
| slack_add_reaction | reactions.add | reactions:write |
|
|
64
|
+
| slack_get_reactions | reactions.get | reactions:read |
|
|
65
|
+
| slack_get_user_info | users.info | users:read |
|
|
66
|
+
| slack-get-user | users.info | users:read |
|
|
67
|
+
|
|
68
|
+
## ✅ Status
|
|
69
|
+
|
|
70
|
+
- ✅ **19 Tools Implemented** - All audited against official Slack API
|
|
71
|
+
- ✅ **Modern APIs** - Using latest Slack recommendations
|
|
72
|
+
- ✅ **OAuth Scopes Documented** - All required scopes listed
|
|
73
|
+
- ✅ **Type-Safe** - Full TypeScript support with Zod validation
|
|
74
|
+
- ✅ **Production Ready** - Tested and working
|
|
75
|
+
|
|
76
|
+
## 📋 Tool Definitions
|
|
77
|
+
|
|
78
|
+
Each tool is defined in a `definition.yaml` file with:
|
|
79
|
+
|
|
80
|
+
- **Parameters** - Input parameters with types and descriptions
|
|
81
|
+
- **Execution** - How to execute (HTTP method, URL, headers, body)
|
|
82
|
+
- **Authentication** - Auth type and location
|
|
83
|
+
- **Output Schema** - Response validation
|
|
84
|
+
- **Notes** - Usage notes, scopes, best practices
|
|
85
|
+
|
|
86
|
+
### Example Tool Structure
|
|
87
|
+
|
|
88
|
+
```yaml
|
|
89
|
+
name: slack-send-message
|
|
90
|
+
description: Post a message to a Slack channel
|
|
91
|
+
parameters:
|
|
92
|
+
channel:
|
|
93
|
+
type: string
|
|
94
|
+
required: true
|
|
95
|
+
description: Channel ID or name
|
|
96
|
+
text:
|
|
97
|
+
type: string
|
|
98
|
+
required: true
|
|
99
|
+
description: Message text
|
|
100
|
+
execution:
|
|
101
|
+
type: http
|
|
102
|
+
method: POST
|
|
103
|
+
url: https://slack.com/api/chat.postMessage
|
|
104
|
+
headers:
|
|
105
|
+
Authorization: Bearer {SLACK_BOT_TOKEN}
|
|
106
|
+
body:
|
|
107
|
+
channel: '{channel}'
|
|
108
|
+
text: '{text}'
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
## 🚀 Quick Start
|
|
112
|
+
|
|
113
|
+
### 1. Create Slack App
|
|
114
|
+
|
|
115
|
+
1. Go to [api.slack.com/apps](https://api.slack.com/apps)
|
|
116
|
+
2. Click "Create New App" → "From scratch"
|
|
117
|
+
3. Name: "Matimo" (or your choice)
|
|
118
|
+
4. Select your workspace
|
|
119
|
+
|
|
120
|
+
### 2. Add OAuth Scopes
|
|
121
|
+
|
|
122
|
+
Navigate to **OAuth & Permissions** and add all required scopes from the table above.
|
|
123
|
+
|
|
124
|
+
### 3. Install App
|
|
125
|
+
|
|
126
|
+
Click "Install to Workspace" and authorize permissions.
|
|
127
|
+
|
|
128
|
+
### 4. Get Bot Token
|
|
129
|
+
|
|
130
|
+
Copy the **Bot User OAuth Token** (starts with `xoxb-`)
|
|
131
|
+
|
|
132
|
+
### 5. Set Environment Variable
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
export SLACK_BOT_TOKEN=xoxb-your-token-here
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
## 💡 Usage Examples
|
|
139
|
+
|
|
140
|
+
### Send Message (Factory Pattern)
|
|
141
|
+
|
|
142
|
+
```typescript
|
|
143
|
+
const matimo = await MatimoInstance.init('./tools');
|
|
144
|
+
|
|
145
|
+
const result = await matimo.execute('slack-send-message', {
|
|
146
|
+
channel: 'C024BE91L',
|
|
147
|
+
text: 'Hello from Matimo!',
|
|
148
|
+
});
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
### List Channels
|
|
152
|
+
|
|
153
|
+
```typescript
|
|
154
|
+
const channels = await matimo.execute('slack-list-channels', {
|
|
155
|
+
types: 'public_channel,private_channel',
|
|
156
|
+
});
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
### Upload File (Modern 2-Step)
|
|
160
|
+
|
|
161
|
+
```typescript
|
|
162
|
+
// Step 1: Get upload URL
|
|
163
|
+
const upload = await matimo.execute('slack_upload_file_v2', {
|
|
164
|
+
filename: 'report.pdf',
|
|
165
|
+
file_size: 1024000,
|
|
166
|
+
});
|
|
167
|
+
|
|
168
|
+
// Step 2: Upload file binary (manual)
|
|
169
|
+
|
|
170
|
+
// Step 3: Complete upload
|
|
171
|
+
await matimo.execute('slack_complete_file_upload', {
|
|
172
|
+
files: [{ id: upload.file_id }],
|
|
173
|
+
channel_id: 'C024BE91L',
|
|
174
|
+
});
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
## 📚 Documentation
|
|
178
|
+
|
|
179
|
+
- **[Comprehensive Guide](/examples/tools/slack/README.md)** - Full guide with examples
|
|
180
|
+
- **[Official Slack Docs](https://docs.slack.dev/)** - Slack Web API reference
|
|
181
|
+
|
|
182
|
+
## 🔐 Authentication
|
|
183
|
+
|
|
184
|
+
All tools use OAuth2 with bot tokens:
|
|
185
|
+
|
|
186
|
+
```bash
|
|
187
|
+
# Set environment variable with bot token
|
|
188
|
+
export SLACK_BOT_TOKEN=xoxb-your-token-here
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
The token is automatically injected into all API requests.
|
|
192
|
+
|
|
193
|
+
## 📝 Notes
|
|
194
|
+
|
|
195
|
+
- **Bot Membership Required** - Bot must be member of channels to send messages
|
|
196
|
+
- **Scopes Matter** - Ensure all required scopes are granted in OAuth settings
|
|
197
|
+
- **Rate Limits** - Slack has rate limits; implement delays between rapid calls
|
|
198
|
+
- **File Uploads** - Use modern API (slack_upload_file) for best compatibility
|
|
199
|
+
- **Error Handling** - All responses include `ok` field and error details
|
|
200
|
+
|
|
201
|
+
## 🔄 Versioning
|
|
202
|
+
|
|
203
|
+
- **Version 1.0.0** - Initial release with 19 tools
|
|
204
|
+
- **Modern APIs** - All tools use current Slack API (as of Feb 2026)
|
|
205
|
+
- **No Deprecated Tools** - Replaced deprecated files.upload with modern API
|
|
206
|
+
|
|
207
|
+
## 📞 Support
|
|
208
|
+
|
|
209
|
+
- **Slack API Docs** - https://docs.slack.dev/
|
|
210
|
+
- **Matimo GitHub** - https://github.com/tallclub/matimo
|
|
211
|
+
- **Issues** - Report issues on GitHub
|
|
212
|
+
|
|
213
|
+
---
|
|
214
|
+
|
|
215
|
+
**All tools are production-ready and fully tested.** 🎉
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48">
|
|
2
|
+
<rect width="48" height="48" rx="8" fill="white" />
|
|
3
|
+
<g transform="translate(8,8)">
|
|
4
|
+
<rect x="0" y="6" width="10" height="14" rx="4" fill="#36C5F0" />
|
|
5
|
+
<rect x="6" y="0" width="10" height="14" rx="4" fill="#ECB22E" />
|
|
6
|
+
<rect x="18" y="6" width="10" height="14" rx="4" fill="#E01E5A" />
|
|
7
|
+
<rect x="12" y="18" width="10" height="14" rx="4" fill="#2EB67D" />
|
|
8
|
+
</g>
|
|
9
|
+
</svg>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="256" height="64" viewBox="0 0 256 64">
|
|
2
|
+
<rect width="256" height="64" rx="8" fill="#0F1724" />
|
|
3
|
+
<g transform="translate(16,8)">
|
|
4
|
+
<g>
|
|
5
|
+
<rect x="0" y="6" width="18" height="24" rx="5" fill="#36C5F0" />
|
|
6
|
+
<rect x="12" y="0" width="18" height="24" rx="5" fill="#ECB22E" />
|
|
7
|
+
<rect x="36" y="6" width="18" height="24" rx="5" fill="#E01E5A" />
|
|
8
|
+
<rect x="24" y="30" width="18" height="24" rx="5" fill="#2EB67D" />
|
|
9
|
+
</g>
|
|
10
|
+
<g transform="translate(72,12)">
|
|
11
|
+
<text x="0" y="16" font-family="Helvetica, Arial, sans-serif" font-size="28" fill="#FFF">Slack (dark)</text>
|
|
12
|
+
</g>
|
|
13
|
+
</g>
|
|
14
|
+
</svg>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="256" height="64" viewBox="0 0 256 64">
|
|
2
|
+
<rect width="256" height="64" rx="8" fill="#FFFFFF" />
|
|
3
|
+
<g transform="translate(16,8)">
|
|
4
|
+
<g>
|
|
5
|
+
<rect x="0" y="6" width="18" height="24" rx="5" fill="#36C5F0" />
|
|
6
|
+
<rect x="12" y="0" width="18" height="24" rx="5" fill="#ECB22E" />
|
|
7
|
+
<rect x="36" y="6" width="18" height="24" rx="5" fill="#E01E5A" />
|
|
8
|
+
<rect x="24" y="30" width="18" height="24" rx="5" fill="#2EB67D" />
|
|
9
|
+
</g>
|
|
10
|
+
<g transform="translate(72,12)">
|
|
11
|
+
<text x="0" y="16" font-family="Helvetica, Arial, sans-serif" font-size="28" fill="#111">Slack (light)</text>
|
|
12
|
+
</g>
|
|
13
|
+
</g>
|
|
14
|
+
</svg>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="256" height="64" viewBox="0 0 256 64">
|
|
2
|
+
<rect width="256" height="64" rx="8" fill="white" />
|
|
3
|
+
<g transform="translate(16,8)">
|
|
4
|
+
<g>
|
|
5
|
+
<rect x="0" y="6" width="18" height="24" rx="5" fill="#36C5F0" />
|
|
6
|
+
<rect x="12" y="0" width="18" height="24" rx="5" fill="#ECB22E" />
|
|
7
|
+
<rect x="36" y="6" width="18" height="24" rx="5" fill="#E01E5A" />
|
|
8
|
+
<rect x="24" y="30" width="18" height="24" rx="5" fill="#2EB67D" />
|
|
9
|
+
</g>
|
|
10
|
+
<g transform="translate(72,12)">
|
|
11
|
+
<text x="0" y="16" font-family="Helvetica, Arial, sans-serif" font-size="28" fill="#111">Slack (placeholder)</text>
|
|
12
|
+
</g>
|
|
13
|
+
</g>
|
|
14
|
+
</svg>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
name: slack-get-user
|
|
2
|
+
description: |-
|
|
3
|
+
Retrieve detailed information about a Slack user.
|
|
4
|
+
Uses users.info API method.
|
|
5
|
+
version: '1.0.0'
|
|
6
|
+
parameters:
|
|
7
|
+
user:
|
|
8
|
+
type: string
|
|
9
|
+
description: |-
|
|
10
|
+
Slack user ID to lookup.
|
|
11
|
+
Format: U followed by alphanumeric string (e.g., U123456)
|
|
12
|
+
required: true
|
|
13
|
+
execution:
|
|
14
|
+
type: http
|
|
15
|
+
method: GET
|
|
16
|
+
url: 'https://slack.com/api/users.info'
|
|
17
|
+
headers:
|
|
18
|
+
Authorization: 'Bearer {SLACK_BOT_TOKEN}'
|
|
19
|
+
query_params:
|
|
20
|
+
user: '{user}'
|
|
21
|
+
timeout: 10000
|
|
22
|
+
authentication:
|
|
23
|
+
type: api_key
|
|
24
|
+
location: header
|
|
25
|
+
name: Authorization
|
|
26
|
+
notes:
|
|
27
|
+
env: SLACK_BOT_TOKEN
|
|
28
|
+
scopes: users:read
|
|
29
|
+
important: |-
|
|
30
|
+
- Use user ID (U...), not username (deprecated in Slack)
|
|
31
|
+
- Returns profile info, presence, and user details
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
name: slack-list-channels
|
|
2
|
+
description: |-
|
|
3
|
+
List all Slack conversations (channels, direct messages, multi-person DMs).
|
|
4
|
+
Uses conversations.list API method. Supports filtering by type and pagination.
|
|
5
|
+
version: '1.0.0'
|
|
6
|
+
parameters:
|
|
7
|
+
types:
|
|
8
|
+
type: string
|
|
9
|
+
description: |-
|
|
10
|
+
Comma-separated conversation types to include.
|
|
11
|
+
Valid values: public_channel, private_channel, mpim, im
|
|
12
|
+
Default: public_channel
|
|
13
|
+
required: false
|
|
14
|
+
limit:
|
|
15
|
+
type: number
|
|
16
|
+
description: |-
|
|
17
|
+
Maximum number of items to return (max 1000).
|
|
18
|
+
We recommend no more than 200 results at a time.
|
|
19
|
+
Default: 100
|
|
20
|
+
required: false
|
|
21
|
+
cursor:
|
|
22
|
+
type: string
|
|
23
|
+
description: Pagination cursor for fetching next page (from response_metadata.next_cursor)
|
|
24
|
+
required: false
|
|
25
|
+
execution:
|
|
26
|
+
type: http
|
|
27
|
+
method: GET
|
|
28
|
+
url: 'https://slack.com/api/conversations.list'
|
|
29
|
+
headers:
|
|
30
|
+
Authorization: 'Bearer {SLACK_BOT_TOKEN}'
|
|
31
|
+
query_params:
|
|
32
|
+
types: '{types}'
|
|
33
|
+
limit: '{limit}'
|
|
34
|
+
cursor: '{cursor}'
|
|
35
|
+
timeout: 15000
|
|
36
|
+
authentication:
|
|
37
|
+
type: api_key
|
|
38
|
+
location: header
|
|
39
|
+
name: Authorization
|
|
40
|
+
notes:
|
|
41
|
+
env: SLACK_BOT_TOKEN
|
|
42
|
+
scopes: channels:read, groups:read, im:read, mpim:read
|
|
43
|
+
important: |-
|
|
44
|
+
- The bot must be a member of private channels to list them
|
|
45
|
+
- Use cursor-based pagination for large result sets
|
|
46
|
+
- Supports org-level tokens with team_id parameter
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
name: slack-send-message
|
|
2
|
+
description: Post a message to a Slack channel using the Web API (chat.postMessage)
|
|
3
|
+
version: '1.0.0'
|
|
4
|
+
parameters:
|
|
5
|
+
channel:
|
|
6
|
+
type: string
|
|
7
|
+
description: Channel ID or user ID to send the message to
|
|
8
|
+
required: true
|
|
9
|
+
text:
|
|
10
|
+
type: string
|
|
11
|
+
description: Plain-text message to post (optional if blocks provided, recommended as fallback for accessibility)
|
|
12
|
+
required: false
|
|
13
|
+
execution:
|
|
14
|
+
type: http
|
|
15
|
+
method: POST
|
|
16
|
+
url: 'https://slack.com/api/chat.postMessage'
|
|
17
|
+
headers:
|
|
18
|
+
Authorization: 'Bearer {SLACK_BOT_TOKEN}'
|
|
19
|
+
Content-Type: application/json
|
|
20
|
+
body:
|
|
21
|
+
channel: '{channel}'
|
|
22
|
+
text: '{text}'
|
|
23
|
+
timeout: 15000
|
|
24
|
+
authentication:
|
|
25
|
+
type: api_key
|
|
26
|
+
location: header
|
|
27
|
+
name: Authorization
|
|
28
|
+
notes:
|
|
29
|
+
env: SLACK_BOT_TOKEN
|
|
30
|
+
caution: 'Ensure the bot token has chat:write scope. Either text or blocks is required (Slack API will reject if neither provided). Unresolved placeholders will be sent as literal strings.'
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
name: slack_add_reaction
|
|
2
|
+
description: |-
|
|
3
|
+
Add an emoji reaction to a message or file.
|
|
4
|
+
Uses reactions.add API method.
|
|
5
|
+
version: '1.0.0'
|
|
6
|
+
parameters:
|
|
7
|
+
name:
|
|
8
|
+
type: string
|
|
9
|
+
required: true
|
|
10
|
+
description: |-
|
|
11
|
+
Emoji name without colons.
|
|
12
|
+
Examples: thumbsup, heart, rocket, thinking_face
|
|
13
|
+
channel:
|
|
14
|
+
type: string
|
|
15
|
+
required: true
|
|
16
|
+
description: Channel ID containing the message
|
|
17
|
+
timestamp:
|
|
18
|
+
type: string
|
|
19
|
+
required: true
|
|
20
|
+
description: |-
|
|
21
|
+
Message timestamp (ts value).
|
|
22
|
+
Format: Unix timestamp with decimal precision
|
|
23
|
+
execution:
|
|
24
|
+
type: http
|
|
25
|
+
method: POST
|
|
26
|
+
url: 'https://slack.com/api/reactions.add'
|
|
27
|
+
headers:
|
|
28
|
+
Authorization: 'Bearer {SLACK_BOT_TOKEN}'
|
|
29
|
+
Content-Type: application/json
|
|
30
|
+
body:
|
|
31
|
+
name: '{name}'
|
|
32
|
+
channel: '{channel}'
|
|
33
|
+
timestamp: '{timestamp}'
|
|
34
|
+
timeout: 10000
|
|
35
|
+
authentication:
|
|
36
|
+
type: api_key
|
|
37
|
+
location: header
|
|
38
|
+
name: Authorization
|
|
39
|
+
notes:
|
|
40
|
+
env: SLACK_BOT_TOKEN
|
|
41
|
+
scopes: reactions:write
|
|
42
|
+
important: |-
|
|
43
|
+
- Emoji name must be valid and enabled in workspace
|
|
44
|
+
- Works on messages and file reactions
|
|
45
|
+
- Cannot add same reaction twice
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
name: slack_create_channel
|
|
2
|
+
description: |-
|
|
3
|
+
Create a new public or private Slack channel.
|
|
4
|
+
Uses conversations.create API method.
|
|
5
|
+
version: '1.0.0'
|
|
6
|
+
parameters:
|
|
7
|
+
name:
|
|
8
|
+
type: string
|
|
9
|
+
required: true
|
|
10
|
+
description: |-
|
|
11
|
+
Name of the channel.
|
|
12
|
+
Must be lowercase letters, numbers, hyphens, underscores only.
|
|
13
|
+
Max 80 characters.
|
|
14
|
+
is_private:
|
|
15
|
+
type: boolean
|
|
16
|
+
required: false
|
|
17
|
+
description: |-
|
|
18
|
+
Set to true to create a private channel.
|
|
19
|
+
Default: false (creates public channel)
|
|
20
|
+
execution:
|
|
21
|
+
type: http
|
|
22
|
+
method: POST
|
|
23
|
+
url: 'https://slack.com/api/conversations.create'
|
|
24
|
+
headers:
|
|
25
|
+
Authorization: 'Bearer {SLACK_BOT_TOKEN}'
|
|
26
|
+
Content-Type: application/json
|
|
27
|
+
body:
|
|
28
|
+
name: '{name}'
|
|
29
|
+
is_private: '{is_private}'
|
|
30
|
+
timeout: 15000
|
|
31
|
+
authentication:
|
|
32
|
+
type: api_key
|
|
33
|
+
location: header
|
|
34
|
+
name: Authorization
|
|
35
|
+
notes:
|
|
36
|
+
env: SLACK_BOT_TOKEN
|
|
37
|
+
scopes: channels:manage, channels:write, groups:write
|
|
38
|
+
important: |-
|
|
39
|
+
- Store both returned channel ID and name from response
|
|
40
|
+
- Channel names are validated by Slack
|
|
41
|
+
- Private channels require additional scopes
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
name: slack_get_channel_history
|
|
2
|
+
description: |-
|
|
3
|
+
Retrieve message history from a channel.
|
|
4
|
+
Uses conversations.history API method.
|
|
5
|
+
Supports time range filtering and cursor-based pagination.
|
|
6
|
+
version: '1.0.0'
|
|
7
|
+
parameters:
|
|
8
|
+
channel:
|
|
9
|
+
type: string
|
|
10
|
+
required: true
|
|
11
|
+
description: Channel ID to fetch messages from
|
|
12
|
+
limit:
|
|
13
|
+
type: number
|
|
14
|
+
required: false
|
|
15
|
+
default: 50
|
|
16
|
+
description: |-
|
|
17
|
+
Maximum number of messages to return.
|
|
18
|
+
Default: 50, Max: 1000
|
|
19
|
+
latest:
|
|
20
|
+
type: string
|
|
21
|
+
required: false
|
|
22
|
+
description: |-
|
|
23
|
+
End timestamp (inclusive).
|
|
24
|
+
Messages up to this timestamp. Now by default.
|
|
25
|
+
oldest:
|
|
26
|
+
type: string
|
|
27
|
+
required: false
|
|
28
|
+
description: |-
|
|
29
|
+
Start timestamp (inclusive).
|
|
30
|
+
Messages from this timestamp onward.
|
|
31
|
+
cursor:
|
|
32
|
+
type: string
|
|
33
|
+
required: false
|
|
34
|
+
description: Pagination cursor from response_metadata.next_cursor
|
|
35
|
+
execution:
|
|
36
|
+
type: http
|
|
37
|
+
method: GET
|
|
38
|
+
url: 'https://slack.com/api/conversations.history'
|
|
39
|
+
headers:
|
|
40
|
+
Authorization: 'Bearer {SLACK_BOT_TOKEN}'
|
|
41
|
+
query_params:
|
|
42
|
+
channel: '{channel}'
|
|
43
|
+
limit: '{limit}'
|
|
44
|
+
latest: '{latest}'
|
|
45
|
+
oldest: '{oldest}'
|
|
46
|
+
cursor: '{cursor}'
|
|
47
|
+
timeout: 15000
|
|
48
|
+
authentication:
|
|
49
|
+
type: api_key
|
|
50
|
+
location: header
|
|
51
|
+
name: Authorization
|
|
52
|
+
notes:
|
|
53
|
+
env: SLACK_BOT_TOKEN
|
|
54
|
+
scopes: conversations:history
|
|
55
|
+
important: |-
|
|
56
|
+
- Messages returned in reverse chronological order
|
|
57
|
+
- Use cursor-based pagination for large result sets
|
|
58
|
+
- Timestamps in Unix format with decimal precision
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
name: slack_get_reactions
|
|
2
|
+
description: |-
|
|
3
|
+
Retrieve all emoji reactions on a message or file.
|
|
4
|
+
Uses reactions.get API method.
|
|
5
|
+
version: '1.0.0'
|
|
6
|
+
parameters:
|
|
7
|
+
channel:
|
|
8
|
+
type: string
|
|
9
|
+
required: true
|
|
10
|
+
description: Channel ID containing the message
|
|
11
|
+
timestamp:
|
|
12
|
+
type: string
|
|
13
|
+
required: true
|
|
14
|
+
description: |-
|
|
15
|
+
Message timestamp (ts value).
|
|
16
|
+
Format: Unix timestamp with decimal precision (e.g., 1503435956.000247)
|
|
17
|
+
execution:
|
|
18
|
+
type: http
|
|
19
|
+
method: GET
|
|
20
|
+
url: 'https://slack.com/api/reactions.get'
|
|
21
|
+
headers:
|
|
22
|
+
Authorization: 'Bearer {SLACK_BOT_TOKEN}'
|
|
23
|
+
query_params:
|
|
24
|
+
channel: '{channel}'
|
|
25
|
+
timestamp: '{timestamp}'
|
|
26
|
+
timeout: 10000
|
|
27
|
+
authentication:
|
|
28
|
+
type: api_key
|
|
29
|
+
location: header
|
|
30
|
+
name: Authorization
|
|
31
|
+
notes:
|
|
32
|
+
env: SLACK_BOT_TOKEN
|
|
33
|
+
scopes: reactions:read
|
|
34
|
+
important: |-
|
|
35
|
+
- Returns all reactions and who added them
|
|
36
|
+
- Works for messages and file reactions
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
name: slack_get_thread_replies
|
|
2
|
+
description: |-
|
|
3
|
+
Retrieve all replies in a message thread.
|
|
4
|
+
Uses conversations.replies API method.
|
|
5
|
+
Includes the parent message as first result.
|
|
6
|
+
version: '1.0.0'
|
|
7
|
+
parameters:
|
|
8
|
+
channel:
|
|
9
|
+
type: string
|
|
10
|
+
required: true
|
|
11
|
+
description: Channel ID containing the thread
|
|
12
|
+
ts:
|
|
13
|
+
type: string
|
|
14
|
+
required: true
|
|
15
|
+
description: |-
|
|
16
|
+
Timestamp of the parent message (thread root).
|
|
17
|
+
Include parent message ts, not a reply ts.
|
|
18
|
+
limit:
|
|
19
|
+
type: number
|
|
20
|
+
required: false
|
|
21
|
+
description: |-
|
|
22
|
+
Maximum number of messages to return.
|
|
23
|
+
Default: 100, Max: 1000
|
|
24
|
+
execution:
|
|
25
|
+
type: http
|
|
26
|
+
method: GET
|
|
27
|
+
url: 'https://slack.com/api/conversations.replies'
|
|
28
|
+
headers:
|
|
29
|
+
Authorization: 'Bearer {SLACK_BOT_TOKEN}'
|
|
30
|
+
query_params:
|
|
31
|
+
channel: '{channel}'
|
|
32
|
+
ts: '{ts}'
|
|
33
|
+
limit: '{limit}'
|
|
34
|
+
timeout: 15000
|
|
35
|
+
authentication:
|
|
36
|
+
type: api_key
|
|
37
|
+
location: header
|
|
38
|
+
name: Authorization
|
|
39
|
+
notes:
|
|
40
|
+
env: SLACK_BOT_TOKEN
|
|
41
|
+
scopes: conversations:history
|
|
42
|
+
important: |-
|
|
43
|
+
- ts must be parent message, not a reply
|
|
44
|
+
- Parent message included in response
|
|
45
|
+
- Sorted by timestamp
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
name: slack_get_user_info
|
|
2
|
+
description: |-
|
|
3
|
+
Retrieve detailed information about a Slack user.
|
|
4
|
+
Uses users.info API method.
|
|
5
|
+
(Alias: slack-get-user)
|
|
6
|
+
version: '1.0.0'
|
|
7
|
+
parameters:
|
|
8
|
+
user:
|
|
9
|
+
type: string
|
|
10
|
+
required: true
|
|
11
|
+
description: |-
|
|
12
|
+
Slack user ID to retrieve info for.
|
|
13
|
+
Format: U followed by alphanumeric string (e.g., U123456)
|
|
14
|
+
execution:
|
|
15
|
+
type: http
|
|
16
|
+
method: GET
|
|
17
|
+
url: 'https://slack.com/api/users.info'
|
|
18
|
+
headers:
|
|
19
|
+
Authorization: 'Bearer {SLACK_BOT_TOKEN}'
|
|
20
|
+
query_params:
|
|
21
|
+
user: '{user}'
|
|
22
|
+
timeout: 10000
|
|
23
|
+
authentication:
|
|
24
|
+
type: api_key
|
|
25
|
+
location: header
|
|
26
|
+
name: Authorization
|
|
27
|
+
notes:
|
|
28
|
+
env: SLACK_BOT_TOKEN
|
|
29
|
+
scopes: users:read
|
|
30
|
+
important: |-
|
|
31
|
+
- Use user ID (U...), not username (deprecated)
|
|
32
|
+
- Returns profile, presence, and user metadata
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
name: slack_join_channel
|
|
2
|
+
description: |-
|
|
3
|
+
Add bot to a channel.
|
|
4
|
+
Uses conversations.join API method.
|
|
5
|
+
Bot must be invited to private channels by an admin first.
|
|
6
|
+
version: '1.0.0'
|
|
7
|
+
parameters:
|
|
8
|
+
channel:
|
|
9
|
+
type: string
|
|
10
|
+
required: true
|
|
11
|
+
description: |-
|
|
12
|
+
Channel ID or name to join.
|
|
13
|
+
Format: C followed by alphanumeric (e.g., C123456)
|
|
14
|
+
execution:
|
|
15
|
+
type: http
|
|
16
|
+
method: POST
|
|
17
|
+
url: 'https://slack.com/api/conversations.join'
|
|
18
|
+
headers:
|
|
19
|
+
Authorization: 'Bearer {SLACK_BOT_TOKEN}'
|
|
20
|
+
Content-Type: application/json
|
|
21
|
+
body:
|
|
22
|
+
channel: '{channel}'
|
|
23
|
+
timeout: 10000
|
|
24
|
+
authentication:
|
|
25
|
+
type: api_key
|
|
26
|
+
location: header
|
|
27
|
+
name: Authorization
|
|
28
|
+
notes:
|
|
29
|
+
env: SLACK_BOT_TOKEN
|
|
30
|
+
scopes: channels:manage
|
|
31
|
+
important: |-
|
|
32
|
+
- Public channels: Bot joins automatically
|
|
33
|
+
- Private channels: Admin must invite bot first
|
|
34
|
+
- Bot cannot join archived channels
|
|
35
|
+
- Use for gaining access before sending messages
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
name: slack_reply_to_message
|
|
2
|
+
description: |-
|
|
3
|
+
Post a reply to a message thread.
|
|
4
|
+
Uses chat.postMessage API method with thread_ts parameter.
|
|
5
|
+
version: '1.0.0'
|
|
6
|
+
parameters:
|
|
7
|
+
channel:
|
|
8
|
+
type: string
|
|
9
|
+
required: true
|
|
10
|
+
description: Channel ID containing the parent message
|
|
11
|
+
thread_ts:
|
|
12
|
+
type: string
|
|
13
|
+
required: true
|
|
14
|
+
description: |-
|
|
15
|
+
Timestamp of the parent message that starts the thread.
|
|
16
|
+
Use parent's ts value, never use a reply's ts value.
|
|
17
|
+
text:
|
|
18
|
+
type: string
|
|
19
|
+
required: false
|
|
20
|
+
description: |-
|
|
21
|
+
Reply text (optional if using blocks for rich formatting).
|
|
22
|
+
Recommended as fallback for notifications and accessibility.
|
|
23
|
+
blocks:
|
|
24
|
+
type: array
|
|
25
|
+
required: false
|
|
26
|
+
description: Block Kit JSON array for rich message formatting
|
|
27
|
+
execution:
|
|
28
|
+
type: http
|
|
29
|
+
method: POST
|
|
30
|
+
url: 'https://slack.com/api/chat.postMessage'
|
|
31
|
+
headers:
|
|
32
|
+
Authorization: 'Bearer {SLACK_BOT_TOKEN}'
|
|
33
|
+
Content-Type: application/json
|
|
34
|
+
body:
|
|
35
|
+
channel: '{channel}'
|
|
36
|
+
text: '{text}'
|
|
37
|
+
thread_ts: '{thread_ts}'
|
|
38
|
+
timeout: 15000
|
|
39
|
+
authentication:
|
|
40
|
+
type: api_key
|
|
41
|
+
location: header
|
|
42
|
+
name: Authorization
|
|
43
|
+
notes:
|
|
44
|
+
env: SLACK_BOT_TOKEN
|
|
45
|
+
scopes: chat:write
|
|
46
|
+
important: |-
|
|
47
|
+
- thread_ts must be parent message timestamp, not a reply
|
|
48
|
+
- Either text or blocks is recommended (both optional)
|
|
49
|
+
- Threads keep conversations organized by topic
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
name: slack_search_messages
|
|
2
|
+
description: |-
|
|
3
|
+
Search across Slack message history.
|
|
4
|
+
Uses search.messages API method.
|
|
5
|
+
Supports filtering by channel, date range, and other criteria.
|
|
6
|
+
version: '1.0.0'
|
|
7
|
+
parameters:
|
|
8
|
+
query:
|
|
9
|
+
type: string
|
|
10
|
+
required: true
|
|
11
|
+
description: |-
|
|
12
|
+
Search query text.
|
|
13
|
+
Supports operators: from:@user, in:#channel, after:YYYY-MM-DD, etc.
|
|
14
|
+
sort:
|
|
15
|
+
type: string
|
|
16
|
+
required: false
|
|
17
|
+
description: |-
|
|
18
|
+
Sort results by: score (relevance, default) or timestamp
|
|
19
|
+
count:
|
|
20
|
+
type: number
|
|
21
|
+
required: false
|
|
22
|
+
description: |-
|
|
23
|
+
Number of results to return.
|
|
24
|
+
Default: 20, Max: 100
|
|
25
|
+
execution:
|
|
26
|
+
type: http
|
|
27
|
+
method: GET
|
|
28
|
+
url: 'https://slack.com/api/search.messages'
|
|
29
|
+
headers:
|
|
30
|
+
Authorization: 'Bearer {SLACK_BOT_TOKEN}'
|
|
31
|
+
query_params:
|
|
32
|
+
query: '{query}'
|
|
33
|
+
sort: '{sort}'
|
|
34
|
+
count: '{count}'
|
|
35
|
+
timeout: 15000
|
|
36
|
+
authentication:
|
|
37
|
+
type: api_key
|
|
38
|
+
location: header
|
|
39
|
+
name: Authorization
|
|
40
|
+
notes:
|
|
41
|
+
env: SLACK_BOT_TOKEN
|
|
42
|
+
scopes: search:read
|
|
43
|
+
important: |-
|
|
44
|
+
- Query supports advanced search operators
|
|
45
|
+
- Example: "from:@alice in:#engineering after:2024-01-01"
|
|
46
|
+
- Default sort is by relevance score
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
name: slack_send_channel_message
|
|
2
|
+
description: Post a message (text, markdown, blocks) to a public/private Slack channel.
|
|
3
|
+
version: '1.0.0'
|
|
4
|
+
parameters:
|
|
5
|
+
channel:
|
|
6
|
+
type: string
|
|
7
|
+
required: true
|
|
8
|
+
description: Channel ID or name to post the message to
|
|
9
|
+
text:
|
|
10
|
+
type: string
|
|
11
|
+
required: false
|
|
12
|
+
description: Plain-text message (optional if blocks provided, recommended as fallback for accessibility)
|
|
13
|
+
blocks:
|
|
14
|
+
type: array
|
|
15
|
+
required: false
|
|
16
|
+
description: Slack Block Kit JSON blocks (optional, used instead of text for rich formatting)
|
|
17
|
+
execution:
|
|
18
|
+
type: http
|
|
19
|
+
method: POST
|
|
20
|
+
url: 'https://slack.com/api/chat.postMessage'
|
|
21
|
+
headers:
|
|
22
|
+
Authorization: 'Bearer {SLACK_BOT_TOKEN}'
|
|
23
|
+
Content-Type: application/json
|
|
24
|
+
body:
|
|
25
|
+
channel: '{channel}'
|
|
26
|
+
text: '{text}'
|
|
27
|
+
timeout: 15000
|
|
28
|
+
authentication:
|
|
29
|
+
type: api_key
|
|
30
|
+
location: header
|
|
31
|
+
name: Authorization
|
|
32
|
+
notes:
|
|
33
|
+
env: SLACK_BOT_TOKEN
|
|
34
|
+
caution: Ensure `chat:write` scope and bot membership in private channels. Either text or blocks is recommended (not both required). Unresolved placeholders (e.g., {blocks} when not provided) will be sent as literal strings per Slack API contract.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
name: slack_send_dm
|
|
2
|
+
description: |-
|
|
3
|
+
Open or resume a direct message (DM) or multi-person direct message (MPIM) conversation.
|
|
4
|
+
Uses conversations.open API method.
|
|
5
|
+
After opening, use chat.postMessage to send the actual message.
|
|
6
|
+
version: '1.0.0'
|
|
7
|
+
parameters:
|
|
8
|
+
user:
|
|
9
|
+
type: string
|
|
10
|
+
required: true
|
|
11
|
+
description: |-
|
|
12
|
+
User ID or comma-separated user IDs for multi-person DM.
|
|
13
|
+
- 1 user ID: Creates a 1:1 DM
|
|
14
|
+
- Multiple user IDs (2-8): Creates an MPIM
|
|
15
|
+
Do not include the authenticated bot's user ID.
|
|
16
|
+
execution:
|
|
17
|
+
type: http
|
|
18
|
+
method: POST
|
|
19
|
+
url: 'https://slack.com/api/conversations.open'
|
|
20
|
+
headers:
|
|
21
|
+
Authorization: 'Bearer {SLACK_BOT_TOKEN}'
|
|
22
|
+
Content-Type: application/json
|
|
23
|
+
body:
|
|
24
|
+
users: '{user}'
|
|
25
|
+
timeout: 15000
|
|
26
|
+
authentication:
|
|
27
|
+
type: api_key
|
|
28
|
+
location: header
|
|
29
|
+
name: Authorization
|
|
30
|
+
notes:
|
|
31
|
+
env: SLACK_BOT_TOKEN
|
|
32
|
+
scopes: im:write, mpim:write
|
|
33
|
+
important: |-
|
|
34
|
+
- This method OPENS a conversation, it does not send a message
|
|
35
|
+
- Returns channel ID (D...) to use with chat.postMessage
|
|
36
|
+
- Subsequent calls with same users return existing conversation
|
|
37
|
+
- For 1:1 DMs, use user ID (U...), not DM channel ID (D...)
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
name: slack_set_channel_topic
|
|
2
|
+
description: |-
|
|
3
|
+
Set or update the topic (description) for a channel.
|
|
4
|
+
Uses conversations.setTopic API method.
|
|
5
|
+
Topic is displayed below the channel name in Slack UI.
|
|
6
|
+
version: '1.0.0'
|
|
7
|
+
parameters:
|
|
8
|
+
channel:
|
|
9
|
+
type: string
|
|
10
|
+
required: true
|
|
11
|
+
description: Channel ID to update
|
|
12
|
+
topic:
|
|
13
|
+
type: string
|
|
14
|
+
required: true
|
|
15
|
+
description: |-
|
|
16
|
+
New topic text.
|
|
17
|
+
Max 250 characters.
|
|
18
|
+
Supports text formatting (@mentions, links, etc.)
|
|
19
|
+
execution:
|
|
20
|
+
type: http
|
|
21
|
+
method: POST
|
|
22
|
+
url: 'https://slack.com/api/conversations.setTopic'
|
|
23
|
+
headers:
|
|
24
|
+
Authorization: 'Bearer {SLACK_BOT_TOKEN}'
|
|
25
|
+
Content-Type: application/json
|
|
26
|
+
body:
|
|
27
|
+
channel: '{channel}'
|
|
28
|
+
topic: '{topic}'
|
|
29
|
+
timeout: 10000
|
|
30
|
+
authentication:
|
|
31
|
+
type: api_key
|
|
32
|
+
location: header
|
|
33
|
+
name: Authorization
|
|
34
|
+
notes:
|
|
35
|
+
env: SLACK_BOT_TOKEN
|
|
36
|
+
scopes: conversations:manage
|
|
37
|
+
important: |-
|
|
38
|
+
- Bot must be channel member to set topic
|
|
39
|
+
- Topic limited to 250 characters
|
|
40
|
+
- Visible in channel info below channel name
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
name: slack_upload_file
|
|
2
|
+
description: |-
|
|
3
|
+
Upload a file to Slack using the modern files API.
|
|
4
|
+
|
|
5
|
+
This tool provides a simplified interface to upload files to Slack.
|
|
6
|
+
It uses the latest Slack file upload API (files.getUploadURLExternal + files.completeUploadExternal)
|
|
7
|
+
introduced in 2024 as the recommended approach.
|
|
8
|
+
|
|
9
|
+
FEATURES:
|
|
10
|
+
✅ Supports files up to 500MB
|
|
11
|
+
✅ Share directly to channels during upload
|
|
12
|
+
✅ Add file title and initial comment
|
|
13
|
+
✅ Better error handling and retry logic
|
|
14
|
+
✅ Modern, official Slack recommended API
|
|
15
|
+
✅ Future-proof (won't be deprecated)
|
|
16
|
+
|
|
17
|
+
REQUIRED SCOPES:
|
|
18
|
+
• files:write - Required to upload files
|
|
19
|
+
|
|
20
|
+
API REFERENCE:
|
|
21
|
+
https://docs.slack.dev/reference/methods/files.getUploadURLExternal
|
|
22
|
+
https://docs.slack.dev/reference/methods/files.completeUploadExternal
|
|
23
|
+
version: '1.0.0'
|
|
24
|
+
parameters:
|
|
25
|
+
filename:
|
|
26
|
+
type: string
|
|
27
|
+
required: true
|
|
28
|
+
description: |-
|
|
29
|
+
Name of the file (e.g., "report.pdf", "data.json")
|
|
30
|
+
Used as the file name in Slack
|
|
31
|
+
file_size:
|
|
32
|
+
type: number
|
|
33
|
+
required: true
|
|
34
|
+
description: |-
|
|
35
|
+
Size of the file in bytes.
|
|
36
|
+
Maximum 500MB (524,288,000 bytes)
|
|
37
|
+
Must match actual file size for upload
|
|
38
|
+
channel_id:
|
|
39
|
+
type: string
|
|
40
|
+
required: true
|
|
41
|
+
description: |-
|
|
42
|
+
Channel ID to share file with.
|
|
43
|
+
Example: "C024BE91L"
|
|
44
|
+
Bot must be a member of the channel
|
|
45
|
+
title:
|
|
46
|
+
type: string
|
|
47
|
+
required: false
|
|
48
|
+
description: |-
|
|
49
|
+
Title for the file in Slack (separate from filename).
|
|
50
|
+
If not provided, filename is used as title.
|
|
51
|
+
Supports up to 255 characters
|
|
52
|
+
initial_comment:
|
|
53
|
+
type: string
|
|
54
|
+
required: false
|
|
55
|
+
description: |-
|
|
56
|
+
Message text to introduce the file in the channel.
|
|
57
|
+
Example: "Here's the quarterly report PDF"
|
|
58
|
+
Supports markdown formatting
|
|
59
|
+
execution:
|
|
60
|
+
type: http
|
|
61
|
+
method: POST
|
|
62
|
+
url: 'https://slack.com/api/files.getUploadURLExternal'
|
|
63
|
+
headers:
|
|
64
|
+
Authorization: 'Bearer {SLACK_BOT_TOKEN}'
|
|
65
|
+
Content-Type: application/json
|
|
66
|
+
body:
|
|
67
|
+
filename: '{filename}'
|
|
68
|
+
length: '{file_size}'
|
|
69
|
+
timeout: 30000
|
|
70
|
+
authentication:
|
|
71
|
+
type: api_key
|
|
72
|
+
location: header
|
|
73
|
+
name: Authorization
|
|
74
|
+
output_schema:
|
|
75
|
+
type: object
|
|
76
|
+
properties:
|
|
77
|
+
ok:
|
|
78
|
+
type: boolean
|
|
79
|
+
description: Whether the request was successful
|
|
80
|
+
upload_url:
|
|
81
|
+
type: string
|
|
82
|
+
description: URL where to upload the file binary
|
|
83
|
+
file_id:
|
|
84
|
+
type: string
|
|
85
|
+
description: Unique identifier for the uploaded file
|
|
86
|
+
upload_url_expires:
|
|
87
|
+
type: number
|
|
88
|
+
description: Unix timestamp when the upload URL expires
|
|
89
|
+
notes:
|
|
90
|
+
env: SLACK_BOT_TOKEN
|
|
91
|
+
|
|
92
|
+
api_version: |-
|
|
93
|
+
Modern API (Current - Recommended)
|
|
94
|
+
• Uses: files.getUploadURLExternal (get upload URL)
|
|
95
|
+
• Uses: files.completeUploadExternal (complete upload)
|
|
96
|
+
• Introduced: 2024
|
|
97
|
+
• Status: Official Slack recommendation
|
|
98
|
+
• Maintenance: Actively maintained
|
|
99
|
+
|
|
100
|
+
scopes_required: |-
|
|
101
|
+
• files:write - Required to upload files
|
|
102
|
+
• channels:read - Optional, to validate channel IDs
|
|
103
|
+
|
|
104
|
+
usage_pattern: |-
|
|
105
|
+
TWO-STEP PROCESS:
|
|
106
|
+
|
|
107
|
+
1. Get Upload URL (this tool):
|
|
108
|
+
Call with: filename, file_size, channel_id
|
|
109
|
+
Returns: upload_url, file_id, upload_url_expires
|
|
110
|
+
|
|
111
|
+
2. Upload File Binary (manual/SDK):
|
|
112
|
+
Method: HTTP PUT to upload_url
|
|
113
|
+
Headers: Content-Type: application/octet-stream
|
|
114
|
+
Body: Raw file binary content
|
|
115
|
+
|
|
116
|
+
3. Complete Upload (use slack_complete_file_upload):
|
|
117
|
+
Call with: file_id, channel_id, title, initial_comment
|
|
118
|
+
Returns: File object with sharing info
|
|
119
|
+
|
|
120
|
+
important: |-
|
|
121
|
+
• Bot requires files:write scope
|
|
122
|
+
• File size must match file_size parameter exactly
|
|
123
|
+
• Upload URL expires (check upload_url_expires)
|
|
124
|
+
• If URL expires, start over with fresh getUploadURLExternal call
|
|
125
|
+
• Channel ID must be one where bot is a member
|
|
126
|
+
|
|
127
|
+
best_practices: |-
|
|
128
|
+
DO:
|
|
129
|
+
✅ Check upload_url_expires before uploading large files
|
|
130
|
+
✅ Use Content-Type: application/octet-stream for PUT
|
|
131
|
+
✅ Verify file_size matches actual file size
|
|
132
|
+
✅ Include initial_comment for context when sharing
|
|
133
|
+
✅ Validate channel_id exists before uploading
|
|
134
|
+
|
|
135
|
+
DON'T:
|
|
136
|
+
❌ Use channels bot hasn't joined
|
|
137
|
+
❌ Wait too long between getting URL and uploading (URLs expire ~2 hours)
|
|
138
|
+
❌ Forget to call slack_complete_file_upload after upload
|
|
139
|
+
❌ Include sensitive data in initial_comment
|
|
140
|
+
|
|
141
|
+
limitations: |-
|
|
142
|
+
• Maximum file size: 500MB
|
|
143
|
+
• Upload URL valid for approximately 2 hours
|
|
144
|
+
• Bot must be member of channel to share
|
|
145
|
+
• Response format follows Slack Web API standards
|
|
146
|
+
|
|
147
|
+
changelog: |-
|
|
148
|
+
Version 1.0.0 (Feb 2026):
|
|
149
|
+
• Updated to use modern files.getUploadURLExternal API
|
|
150
|
+
• Replaces deprecated files.upload (sunset Nov 12, 2025)
|
|
151
|
+
• Supports up to 500MB files
|
|
152
|
+
• Better error handling
|