feat: add message edit and delete tools#200
Open
JAORMX wants to merge 3 commits intokorotovsky:masterfrom
Open
feat: add message edit and delete tools#200JAORMX wants to merge 3 commits intokorotovsky:masterfrom
JAORMX wants to merge 3 commits intokorotovsky:masterfrom
Conversation
Add conversations_edit_message and conversations_delete_message tools to support editing and deleting Slack messages via chat.update and chat.delete APIs. Both tools are disabled by default and require explicit opt-in via SLACK_MCP_EDIT_MESSAGE_TOOL and SLACK_MCP_DELETE_MESSAGE_TOOL environment variables. They support channel allow/deny lists following the existing pattern. Closes korotovsky#151 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Owner
|
Hi @JAORMX, Thank you for the PR. From my experience it is very often possible to combine add and edit handlers into one handler with some additional logic. Could you try to explore this option to potentially reduce code duplication? |
Contributor
Author
|
@korotovsky sure! I'll get to it |
Merge ConversationsAddMessageHandler and ConversationsEditMessageHandler into a single ConversationsWriteMessageHandler that branches on the presence of message_ts (edit mode vs add mode). Extract resolveToolGate helper to deduplicate env-var gating, channel resolution, and allowlist checking across write and delete parse functions. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Resolve conflict in pkg/server/server.go: keep both edit/delete message tool constants and upstream usergroups tool constants. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
Author
|
@korotovsky rebased and fixed the merge conflict. |
MaxGhenis
reviewed
Feb 23, 2026
MaxGhenis
left a comment
There was a problem hiding this comment.
Would love to see this merged — I'm switching to this MCP server from shouting-mcp-slack and edit/delete is the main feature gap. Happy to help test if useful.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
conversations_edit_messagetool — edits an existing Slack message viachat.updateAPIconversations_delete_messagetool — deletes a Slack message viachat.deleteAPIConversationsWriteMessageHandler(branches onmessage_tspresence)Closes #151
Details
New tools
conversations_edit_messagechannel_id,message_ts,text,content_typetext/plainandtext/markdowncontent types.conversations_delete_messagechannel_id,message_tsEnvironment variables
Both tools are gated behind dedicated env vars (disabled by default):
SLACK_MCP_EDIT_MESSAGE_TOOLtrue,C123,C456(allowlist),!C123(denylist)SLACK_MCP_DELETE_MESSAGE_TOOLtrue,C123,C456(allowlist),!C123(denylist)Both tools can also be enabled via
SLACK_MCP_ENABLED_TOOLS=conversations_edit_message,conversations_delete_message.Architecture
The add and edit message tools share a single handler (
ConversationsWriteMessageHandler) that branches on the presence ofmessage_ts:message_ts→ add mode (posts new message viaPostMessageContext)message_tspresent → edit mode (updates existing message viaUpdateMessageContext)A shared
resolveToolGatehelper deduplicates env-var gating, channel ID resolution, and allowlist checking across write and delete parse functions.Test plan
go build ./...,go vet ./...,go test -run "^Test[^I]" ./... -count=1all pass🤖 Generated with Claude Code