Skip to content

Conversation

@alexgarcia-wq
Copy link

Summary

Implements a new MCP tool get_permalink that constructs Slack permalinks from channel IDs and message timestamps. This addresses feature request #100.

Motivation

As requested in #100 by @cmarken, this enables users to include permalink sources when summarizing Slack conversations. This is particularly valuable for daily standup summaries, citations, and quick navigation back to important messages.

Changes

  • Added FormatPermalinkTimestamp() helper function in pkg/text/text_processor.go to convert Slack timestamp format (1234567890.123456) to permalink format (1234567890123456)
  • Added GetPermalinkHandler() method in pkg/handler/conversations.go that:
    • Accepts channel_id and message_ts parameters
    • Retrieves workspace name via Slack().AuthTest()
    • Constructs and returns the permalink URL
  • Added parseParamsToolGetPermalink() validation method
  • Registered the new tool in pkg/server/server.go with proper parameter descriptions

Usage Example

get_permalink({
  channel_id: "C1234567890",  // or D1234567890 for DMs
  message_ts: "1234567890.123456"
})

Returns:

https://{workspace}.slack.com/archives/C1234567890/p1234567890123456

Testing

Tested locally with real Slack workspace messages. The tool successfully:

  • Extracts workspace name from auth response
  • Formats timestamps correctly
  • Generates valid, clickable Slack permalinks

Related Issues

Closes #100

cc @cmarken @Brandfirst @freddyhaddad

Implements a new MCP tool that constructs Slack permalinks from channel IDs and message timestamps. This enables Claude to provide clickable links when referencing Slack messages, which is valuable for daily summaries, citations, and quick navigation.

Changes:
- Added FormatPermalinkTimestamp() helper to text_processor.go
- Added GetPermalinkHandler() and permalinkParams to conversations.go
- Registered get_permalink tool in server.go with required parameters

The tool accepts channel_id and message_ts, fetches the workspace name via AuthTest, and constructs the permalink in format:
https://{workspace}.slack.com/archives/{channel_id}/p{timestamp_without_dot}

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support to get the permalink to a message

1 participant