Add thread reply support with optional thread-ts parameter#10
Conversation
Co-authored-by: alexec <1142830+alexec@users.noreply.github.com>
Co-authored-by: alexec <1142830+alexec@users.noreply.github.com>
|
@copilot what about |
Co-authored-by: alexec <1142830+alexec@users.noreply.github.com>
Refactored to use
CLI Usage: # Send a message
slack send-message user@example.com "Hello!"
# Reply to a message
slack send-message user@example.com "Thanks!" "1234567890.123456"Help output: |
|
@copilot please address my comment above. |
Co-authored-by: alexec <1142830+alexec@users.noreply.github.com>
Updated in commit efc3a49. Changed parameter name to CLI Usage: Usage:
slack configure - configure Slack token (reads from stdin)
slack send-message <channel|email> <message> [thread-ts] - send a message (optionally reply to a thread)
slack mcp-server - start MCP server (Model Context Protocol)MCP Tool Parameter:
Example: # Reply to a message in a thread (thread-ts is the timestamp of the parent message)
slack send-message user@example.com "Thanks for the feedback!" "1234567890.123456"
Done in commit efc3a49. The parameter is now called |
|
@copilot please print the of the message once sent so that the the user can note the and reply to it. |
The comment appears to be incomplete. Could you please clarify what you'd like me to print? |
|
@copilot when the message has been sent, print the thread-ts from the response, no the next send-message can continue the thread. |
Co-authored-by: alexec <1142830+alexec@users.noreply.github.com>
Implemented in commit f067cda. The CLI Output: $ slack send-message user@example.com "Hello!"
Message sent to user@example.com (U12345678)
thread-ts: 1234567890.123456
$ slack send-message user@example.com "Reply!" "1234567890.123456"
Reply sent to user@example.com (U12345678) in thread 1234567890.123456
thread-ts: 1234567890.654321MCP Server: This allows subsequent messages to continue the thread by using the returned thread-ts. |
|
@copilot this is a bit more complex that I'd like. When sending a message without the thread-ts, you must print the thread-ts. However, if you reply to a thread, do not print the timestamp as it will not change. |
Co-authored-by: alexec <1142830+alexec@users.noreply.github.com>
Simplified in commit 07b1b1a. The thread-ts is now only printed when sending a new message (without thread-ts parameter), not when replying to a thread. New message output: $ slack send-message user@example.com "Hello!"
Message sent to user@example.com (U12345678)
thread-ts: 1234567890.123456Thread reply output (no thread-ts printed): $ slack send-message user@example.com "Reply!" "1234567890.123456"
Reply sent to user@example.com (U12345678) in thread 1234567890.123456MCP Server:
|
Enables replying to messages in Slack threads using an optional thread-ts parameter on the
send-messagecommand. When sending a new message, the thread-ts is printed in the output to enable thread continuation.Changes
CLI: Extended
send-message <channel|email> <message> [thread-ts]with optional thread-ts parameterslack.MsgOptionTS()to set thread timestampMCP Server: Updated
send_messagetool with optionalthread_tsparameterTests: Added validation for missing arguments and token handling
Usage
The thread-ts is Slack's unique message identifier (timestamp). When omitted as a parameter, a new message is sent and the thread-ts is printed; when provided, the message becomes a threaded reply to that parent message.
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.