matimo-slack 0.1.0__tar.gz

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.
Files changed (21) hide show
  1. matimo_slack-0.1.0/.gitignore +63 -0
  2. matimo_slack-0.1.0/PKG-INFO +171 -0
  3. matimo_slack-0.1.0/README.md +157 -0
  4. matimo_slack-0.1.0/pyproject.toml +27 -0
  5. matimo_slack-0.1.0/src/matimo_slack/__init__.py +17 -0
  6. matimo_slack-0.1.0/src/matimo_slack/tools/get-user/definition.yaml +31 -0
  7. matimo_slack-0.1.0/src/matimo_slack/tools/list-channels/definition.yaml +46 -0
  8. matimo_slack-0.1.0/src/matimo_slack/tools/send-message/definition.yaml +30 -0
  9. matimo_slack-0.1.0/src/matimo_slack/tools/slack_add_reaction/definition.yaml +45 -0
  10. matimo_slack-0.1.0/src/matimo_slack/tools/slack_create_channel/definition.yaml +41 -0
  11. matimo_slack-0.1.0/src/matimo_slack/tools/slack_get_channel_history/definition.yaml +58 -0
  12. matimo_slack-0.1.0/src/matimo_slack/tools/slack_get_reactions/definition.yaml +36 -0
  13. matimo_slack-0.1.0/src/matimo_slack/tools/slack_get_thread_replies/definition.yaml +45 -0
  14. matimo_slack-0.1.0/src/matimo_slack/tools/slack_get_user_info/definition.yaml +32 -0
  15. matimo_slack-0.1.0/src/matimo_slack/tools/slack_join_channel/definition.yaml +35 -0
  16. matimo_slack-0.1.0/src/matimo_slack/tools/slack_reply_to_message/definition.yaml +49 -0
  17. matimo_slack-0.1.0/src/matimo_slack/tools/slack_search_messages/definition.yaml +46 -0
  18. matimo_slack-0.1.0/src/matimo_slack/tools/slack_send_channel_message/definition.yaml +34 -0
  19. matimo_slack-0.1.0/src/matimo_slack/tools/slack_send_dm/definition.yaml +37 -0
  20. matimo_slack-0.1.0/src/matimo_slack/tools/slack_set_channel_topic/definition.yaml +40 -0
  21. matimo_slack-0.1.0/src/matimo_slack/tools/slack_upload_file/definition.yaml +152 -0
@@ -0,0 +1,63 @@
1
+ # Dependencies
2
+ **/node_modules/
3
+ package-lock.json
4
+ yarn.lock
5
+
6
+ # Build output
7
+ **/dist/
8
+ *.tsbuildinfo
9
+
10
+ # Python compiled / build
11
+ **/__pycache__/
12
+ *.py[cod]
13
+ *$py.class
14
+ *.egg-info/
15
+ *.egg
16
+ **/build/
17
+ **/.eggs/
18
+ **/.venv/
19
+ **/.mypy_cache/
20
+ **/.ruff_cache/
21
+ **/.pytest_cache/
22
+
23
+ # Test coverage
24
+ **/coverage/
25
+ **/.nyc_output/
26
+
27
+ # IDE
28
+ .vscode/
29
+ .idea/
30
+ *.swp
31
+ *.swo
32
+ *~
33
+ .DS_Store
34
+
35
+ # Environment
36
+ .env
37
+ .env.local
38
+ .env.*.local
39
+
40
+ # Logs
41
+ *.log
42
+ npm-debug.log*
43
+ yarn-debug.log*
44
+ yarn-error.log*
45
+
46
+ # OS
47
+ .DS_Store
48
+ Thumbs.db
49
+
50
+ # Temporary files
51
+ tmp/
52
+ temp/
53
+ *.tmp
54
+ typescript/examples/mcp/matimo-tools/.matimo-approvals.json
55
+ typescript/examples/mcp/matimo-tools/fetch-weather/definition.yaml
56
+ typescript/examples/mcp/matimo-tools/npm_downloads/definition.yaml
57
+ typescript/examples/mcp/matimo-tools/skills/ecosystem-health/SKILL.md
58
+ typescript/examples/mcp/matimo-tools/skills/matimo-health-check/SKILL.md
59
+ typescript/examples/mcp/matimo-tools/skills/moltbook-identity/SKILL.md
60
+ typescript/packages/cli/.matimo/certs/server.crt
61
+ typescript/packages/cli/.matimo/certs/server.key
62
+ typescript/examples/mcp/.matimo/certs/server.crt
63
+ typescript/examples/mcp/.matimo/certs/server.key
@@ -0,0 +1,171 @@
1
+ Metadata-Version: 2.4
2
+ Name: matimo-slack
3
+ Version: 0.1.0
4
+ Summary: Matimo provider — Slack tools (send messages, manage channels, users)
5
+ License: MIT
6
+ Keywords: agents,ai,matimo,slack,tools
7
+ Classifier: Development Status :: 4 - Beta
8
+ Classifier: Intended Audience :: Developers
9
+ Classifier: License :: OSI Approved :: MIT License
10
+ Classifier: Programming Language :: Python :: 3.11
11
+ Requires-Python: >=3.11
12
+ Requires-Dist: matimo-core<0.2.0,>=0.1.0
13
+ Description-Content-Type: text/markdown
14
+
15
+ # matimo-slack
16
+
17
+ > Slack tools for [Matimo](https://matimo.dev) — send messages, manage channels, upload files, and more.
18
+
19
+ [![PyPI](https://img.shields.io/pypi/v/matimo-slack)](https://pypi.org/project/matimo-slack/)
20
+ [![Docs](https://img.shields.io/badge/docs-matimo.dev-blue)](https://matimo.dev/docs)
21
+
22
+ ---
23
+
24
+ ## Installation
25
+
26
+ ```bash
27
+ pip install matimo matimo-slack
28
+ ```
29
+
30
+ ---
31
+
32
+ ## Available Tools (19 Total)
33
+
34
+ | Category | Tool | Description |
35
+ |----------|------|-------------|
36
+ | **Messaging** | `slack_send_channel_message` | Post message with markdown/blocks |
37
+ | | `slack-send-message` | Post plain message to channel |
38
+ | | `slack_reply_to_message` | Reply in thread |
39
+ | | `slack_send_dm` | Send direct message |
40
+ | **Channels** | `slack-list-channels` | List all channels/DMs |
41
+ | | `slack_create_channel` | Create public/private channel |
42
+ | | `slack_join_channel` | Add bot to channel |
43
+ | | `slack_set_channel_topic` | Update channel description/topic |
44
+ | **Files** | `slack_upload_file` | Upload file (modern API) |
45
+ | | `slack_upload_file_v2` | Get upload URL for large files |
46
+ | | `slack_complete_file_upload` | Complete upload and share to channel |
47
+ | **Reading** | `slack_get_channel_history` | Read messages from channel |
48
+ | | `slack_get_thread_replies` | Get thread replies |
49
+ | | `slack_search_messages` | Search message history |
50
+ | **Reactions** | `slack_add_reaction` | Add emoji reaction to message |
51
+ | | `slack_get_reactions` | Get reactions on a message |
52
+ | **Users** | `slack_get_user_info` | Get user profile details |
53
+ | | `slack-get-user` | Alias of `slack_get_user_info` |
54
+
55
+ ---
56
+
57
+ ## Quick Start
58
+
59
+ ```python
60
+ import asyncio
61
+ import os
62
+ from matimo import Matimo
63
+ from matimo_slack import get_tools_path
64
+
65
+ async def main():
66
+ matimo = await Matimo.init(get_tools_path())
67
+
68
+ # Send a message
69
+ await matimo.execute('slack_send_channel_message', {
70
+ 'channel': '#general',
71
+ 'text': 'Hello from Matimo!',
72
+ })
73
+
74
+ # List channels
75
+ result = await matimo.execute('slack-list-channels', {})
76
+ print(result)
77
+
78
+ asyncio.run(main())
79
+ ```
80
+
81
+ ---
82
+
83
+ ## Authentication
84
+
85
+ All tools authenticate using a Slack Bot Token:
86
+
87
+ ```bash
88
+ export SLACK_BOT_TOKEN="xoxb-your-bot-token"
89
+ ```
90
+
91
+ ### Setting Up a Slack App
92
+
93
+ 1. Go to [api.slack.com/apps](https://api.slack.com/apps) → **Create New App** → From scratch
94
+ 2. Navigate to **OAuth & Permissions** and add scopes (see table below)
95
+ 3. Click **Install to Workspace** and copy the **Bot User OAuth Token**
96
+ 4. Set `SLACK_BOT_TOKEN` in your environment
97
+
98
+ ### Required OAuth Scopes
99
+
100
+ | Tool | Slack API Method | Required Scopes |
101
+ |------|-----------------|-----------------|
102
+ | `slack_send_channel_message` / `slack-send-message` | `chat.postMessage` | `chat:write` |
103
+ | `slack_reply_to_message` | `chat.postMessage` | `chat:write` |
104
+ | `slack_send_dm` | `conversations.open` + `chat.postMessage` | `im:write`, `chat:write` |
105
+ | `slack-list-channels` | `conversations.list` | `channels:read`, `groups:read`, `im:read`, `mpim:read` |
106
+ | `slack_create_channel` | `conversations.create` | `channels:manage` |
107
+ | `slack_join_channel` | `conversations.join` | `channels:join` |
108
+ | `slack_set_channel_topic` | `conversations.setTopic` | `channels:write.topic` |
109
+ | `slack_upload_file` / `slack_upload_file_v2` | `files.getUploadURLExternal` | `files:write` |
110
+ | `slack_complete_file_upload` | `files.completeUploadExternal` | `files:write` |
111
+ | `slack_get_channel_history` | `conversations.history` | `channels:history` |
112
+ | `slack_get_thread_replies` | `conversations.replies` | `channels:history` |
113
+ | `slack_search_messages` | `search.messages` | `search:read` |
114
+ | `slack_add_reaction` | `reactions.add` | `reactions:write` |
115
+ | `slack_get_reactions` | `reactions.get` | `reactions:read` |
116
+ | `slack_get_user_info` / `slack-get-user` | `users.info` | `users:read` |
117
+
118
+ ---
119
+
120
+ ## LangChain Agent Example
121
+
122
+ ```python
123
+ from matimo import Matimo
124
+ from matimo_slack import get_tools_path
125
+ from matimo.integrations.langchain import convert_tools_to_langchain
126
+ from langchain_openai import ChatOpenAI
127
+ from langchain.agents import AgentExecutor, create_tool_calling_agent
128
+ from langchain_core.prompts import ChatPromptTemplate
129
+
130
+ matimo = await Matimo.init(get_tools_path())
131
+ lc_tools = convert_tools_to_langchain(
132
+ matimo.list_tools(),
133
+ matimo,
134
+ credentials={'SLACK_BOT_TOKEN': os.environ['SLACK_BOT_TOKEN']},
135
+ )
136
+ llm = ChatOpenAI(model='gpt-4o-mini')
137
+ prompt = ChatPromptTemplate.from_messages([
138
+ ('system', 'You are a Slack assistant.'),
139
+ ('human', '{input}'),
140
+ ('placeholder', '{agent_scratchpad}'),
141
+ ])
142
+ agent = create_tool_calling_agent(llm, lc_tools, prompt)
143
+ executor = AgentExecutor(agent=agent, tools=lc_tools)
144
+ result = await executor.ainvoke({'input': 'List all public channels'})
145
+ ```
146
+
147
+ ---
148
+
149
+ ## Usage Notes
150
+
151
+ - The bot must be **a member of a channel** before it can post messages or read history
152
+ - Use `slack_upload_file` (not the deprecated `files.upload`) for file uploads
153
+ - `slack_search_messages` requires the `search:read` scope which needs special approval from Slack
154
+ - Rate limits apply — add delays between rapid API calls in bulk operations
155
+
156
+ ---
157
+
158
+ ## Documentation
159
+
160
+ - [Slack Integration Guide](https://matimo.dev/docs)
161
+ - [Slack Web API Reference](https://api.slack.com/methods)
162
+ - [Python Examples](https://github.com/tallclub/matimo/tree/main/python/examples/native/slack)
163
+
164
+ ---
165
+
166
+ ## Links
167
+
168
+ - **PyPI:** https://pypi.org/project/matimo-slack/
169
+ - **GitHub:** https://github.com/tallclub/matimo
170
+ - **Slack API Docs:** https://api.slack.com/
171
+
@@ -0,0 +1,157 @@
1
+ # matimo-slack
2
+
3
+ > Slack tools for [Matimo](https://matimo.dev) — send messages, manage channels, upload files, and more.
4
+
5
+ [![PyPI](https://img.shields.io/pypi/v/matimo-slack)](https://pypi.org/project/matimo-slack/)
6
+ [![Docs](https://img.shields.io/badge/docs-matimo.dev-blue)](https://matimo.dev/docs)
7
+
8
+ ---
9
+
10
+ ## Installation
11
+
12
+ ```bash
13
+ pip install matimo matimo-slack
14
+ ```
15
+
16
+ ---
17
+
18
+ ## Available Tools (19 Total)
19
+
20
+ | Category | Tool | Description |
21
+ |----------|------|-------------|
22
+ | **Messaging** | `slack_send_channel_message` | Post message with markdown/blocks |
23
+ | | `slack-send-message` | Post plain message to channel |
24
+ | | `slack_reply_to_message` | Reply in thread |
25
+ | | `slack_send_dm` | Send direct message |
26
+ | **Channels** | `slack-list-channels` | List all channels/DMs |
27
+ | | `slack_create_channel` | Create public/private channel |
28
+ | | `slack_join_channel` | Add bot to channel |
29
+ | | `slack_set_channel_topic` | Update channel description/topic |
30
+ | **Files** | `slack_upload_file` | Upload file (modern API) |
31
+ | | `slack_upload_file_v2` | Get upload URL for large files |
32
+ | | `slack_complete_file_upload` | Complete upload and share to channel |
33
+ | **Reading** | `slack_get_channel_history` | Read messages from channel |
34
+ | | `slack_get_thread_replies` | Get thread replies |
35
+ | | `slack_search_messages` | Search message history |
36
+ | **Reactions** | `slack_add_reaction` | Add emoji reaction to message |
37
+ | | `slack_get_reactions` | Get reactions on a message |
38
+ | **Users** | `slack_get_user_info` | Get user profile details |
39
+ | | `slack-get-user` | Alias of `slack_get_user_info` |
40
+
41
+ ---
42
+
43
+ ## Quick Start
44
+
45
+ ```python
46
+ import asyncio
47
+ import os
48
+ from matimo import Matimo
49
+ from matimo_slack import get_tools_path
50
+
51
+ async def main():
52
+ matimo = await Matimo.init(get_tools_path())
53
+
54
+ # Send a message
55
+ await matimo.execute('slack_send_channel_message', {
56
+ 'channel': '#general',
57
+ 'text': 'Hello from Matimo!',
58
+ })
59
+
60
+ # List channels
61
+ result = await matimo.execute('slack-list-channels', {})
62
+ print(result)
63
+
64
+ asyncio.run(main())
65
+ ```
66
+
67
+ ---
68
+
69
+ ## Authentication
70
+
71
+ All tools authenticate using a Slack Bot Token:
72
+
73
+ ```bash
74
+ export SLACK_BOT_TOKEN="xoxb-your-bot-token"
75
+ ```
76
+
77
+ ### Setting Up a Slack App
78
+
79
+ 1. Go to [api.slack.com/apps](https://api.slack.com/apps) → **Create New App** → From scratch
80
+ 2. Navigate to **OAuth & Permissions** and add scopes (see table below)
81
+ 3. Click **Install to Workspace** and copy the **Bot User OAuth Token**
82
+ 4. Set `SLACK_BOT_TOKEN` in your environment
83
+
84
+ ### Required OAuth Scopes
85
+
86
+ | Tool | Slack API Method | Required Scopes |
87
+ |------|-----------------|-----------------|
88
+ | `slack_send_channel_message` / `slack-send-message` | `chat.postMessage` | `chat:write` |
89
+ | `slack_reply_to_message` | `chat.postMessage` | `chat:write` |
90
+ | `slack_send_dm` | `conversations.open` + `chat.postMessage` | `im:write`, `chat:write` |
91
+ | `slack-list-channels` | `conversations.list` | `channels:read`, `groups:read`, `im:read`, `mpim:read` |
92
+ | `slack_create_channel` | `conversations.create` | `channels:manage` |
93
+ | `slack_join_channel` | `conversations.join` | `channels:join` |
94
+ | `slack_set_channel_topic` | `conversations.setTopic` | `channels:write.topic` |
95
+ | `slack_upload_file` / `slack_upload_file_v2` | `files.getUploadURLExternal` | `files:write` |
96
+ | `slack_complete_file_upload` | `files.completeUploadExternal` | `files:write` |
97
+ | `slack_get_channel_history` | `conversations.history` | `channels:history` |
98
+ | `slack_get_thread_replies` | `conversations.replies` | `channels:history` |
99
+ | `slack_search_messages` | `search.messages` | `search:read` |
100
+ | `slack_add_reaction` | `reactions.add` | `reactions:write` |
101
+ | `slack_get_reactions` | `reactions.get` | `reactions:read` |
102
+ | `slack_get_user_info` / `slack-get-user` | `users.info` | `users:read` |
103
+
104
+ ---
105
+
106
+ ## LangChain Agent Example
107
+
108
+ ```python
109
+ from matimo import Matimo
110
+ from matimo_slack import get_tools_path
111
+ from matimo.integrations.langchain import convert_tools_to_langchain
112
+ from langchain_openai import ChatOpenAI
113
+ from langchain.agents import AgentExecutor, create_tool_calling_agent
114
+ from langchain_core.prompts import ChatPromptTemplate
115
+
116
+ matimo = await Matimo.init(get_tools_path())
117
+ lc_tools = convert_tools_to_langchain(
118
+ matimo.list_tools(),
119
+ matimo,
120
+ credentials={'SLACK_BOT_TOKEN': os.environ['SLACK_BOT_TOKEN']},
121
+ )
122
+ llm = ChatOpenAI(model='gpt-4o-mini')
123
+ prompt = ChatPromptTemplate.from_messages([
124
+ ('system', 'You are a Slack assistant.'),
125
+ ('human', '{input}'),
126
+ ('placeholder', '{agent_scratchpad}'),
127
+ ])
128
+ agent = create_tool_calling_agent(llm, lc_tools, prompt)
129
+ executor = AgentExecutor(agent=agent, tools=lc_tools)
130
+ result = await executor.ainvoke({'input': 'List all public channels'})
131
+ ```
132
+
133
+ ---
134
+
135
+ ## Usage Notes
136
+
137
+ - The bot must be **a member of a channel** before it can post messages or read history
138
+ - Use `slack_upload_file` (not the deprecated `files.upload`) for file uploads
139
+ - `slack_search_messages` requires the `search:read` scope which needs special approval from Slack
140
+ - Rate limits apply — add delays between rapid API calls in bulk operations
141
+
142
+ ---
143
+
144
+ ## Documentation
145
+
146
+ - [Slack Integration Guide](https://matimo.dev/docs)
147
+ - [Slack Web API Reference](https://api.slack.com/methods)
148
+ - [Python Examples](https://github.com/tallclub/matimo/tree/main/python/examples/native/slack)
149
+
150
+ ---
151
+
152
+ ## Links
153
+
154
+ - **PyPI:** https://pypi.org/project/matimo-slack/
155
+ - **GitHub:** https://github.com/tallclub/matimo
156
+ - **Slack API Docs:** https://api.slack.com/
157
+
@@ -0,0 +1,27 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "matimo-slack"
7
+ version = "0.1.0"
8
+ description = "Matimo provider — Slack tools (send messages, manage channels, users)"
9
+ readme = "README.md"
10
+ license = { text = "MIT" }
11
+ requires-python = ">=3.11"
12
+ keywords = ["ai", "tools", "agents", "matimo", "slack"]
13
+ classifiers = [
14
+ "Development Status :: 4 - Beta",
15
+ "Intended Audience :: Developers",
16
+ "License :: OSI Approved :: MIT License",
17
+ "Programming Language :: Python :: 3.11",
18
+ ]
19
+ dependencies = [
20
+ "matimo-core>=0.1.0,<0.2.0",
21
+ ]
22
+
23
+ [project.entry-points."matimo.providers"]
24
+ slack = "matimo_slack:get_tools_path"
25
+
26
+ [tool.hatch.build.targets.wheel]
27
+ packages = ["src/matimo_slack"]
@@ -0,0 +1,17 @@
1
+ """Matimo slack provider — exposes the path to YAML tool definitions."""
2
+ from __future__ import annotations
3
+
4
+ import importlib.resources
5
+ from pathlib import Path
6
+
7
+
8
+ def get_tools_path() -> str:
9
+ """Return the absolute path to the bundled slack tool definitions."""
10
+ try:
11
+ ref = importlib.resources.files("matimo_slack") / "tools"
12
+ return str(ref)
13
+ except Exception:
14
+ return str(Path(__file__).parent / "tools")
15
+
16
+
17
+ __all__ = ["get_tools_path"]
@@ -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