Skip to content

Include channel ID and permalink in search results#265

Open
tmastny wants to merge 1 commit intokorotovsky:masterfrom
tmastny:tim/add-permalink-and-channel-id
Open

Include channel ID and permalink in search results#265
tmastny wants to merge 1 commit intokorotovsky:masterfrom
tmastny:tim/add-permalink-and-channel-id

Conversation

@tmastny
Copy link
Copy Markdown

@tmastny tmastny commented Mar 30, 2026

Addresses #100.

Search results from conversations_search_messages only includes the channel display name, like #general. The Slack search API returns both Channel.ID and Permalink on every SearchMessage, but they are not included in convertMessagesFromSearch.

I often want permalinks to the message to add to docs or to open the thread myself, but I can't reliably get the LLM agent to reconstruct the link. This makes it possible.

Changes:

  • Channel column now includes the ID: C0515UGHR0R (#general)
  • New Permalink column passes through msg.Permalink from the API response

This is similar to #133, but I think worthwhile on its own. Instead of adding a new tool to construct permalinks (which is still useful!) this passes permalinks through when available.

The Slack search API returns both Channel.ID and Permalink on every
SearchMessage, but the MCP server was only using Channel.Name (formatted
as '#channel-name') and discarding the rest. This made it impossible for
LLM agents to construct valid Slack permalink URLs.

- Add Permalink field to Message struct
- Include msg.Channel.ID in the Channel column (format: 'C0515UGHR0R (#channel-name)')
- Pass through msg.Permalink from the Slack API response

Addresses korotovsky#100.
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.

1 participant