feat: add saved_list, saved_update, and saved_clear_completed tools#240
Open
jonzarecki wants to merge 3 commits intokorotovsky:masterfrom
Open
feat: add saved_list, saved_update, and saved_clear_completed tools#240jonzarecki wants to merge 3 commits intokorotovsky:masterfrom
jonzarecki wants to merge 3 commits intokorotovsky:masterfrom
Conversation
Add three new tools for managing Slack's "Save for Later" panel, replacing the deprecated stars.* API (March 2023). Uses internal saved.list, saved.update, and saved.clearCompleted endpoints. - saved_list: List saved items with filter (saved/completed/archived), auto-pagination, and optional message content fetching - saved_update: Mark items as completed and/or set due dates - saved_clear_completed: Bulk-clear all completed items All tools require browser session tokens (xoxc/xoxd) and are guarded at registration time for bot/OAuth tokens. Includes unit tests for CSV format, field extraction, timestamp formatting, parameter validation, and response parsing. Made-with: Cursor
When include_messages=true, items whose message content could not be fetched (e.g. channel access denied) were silently dropped from the output due to a `continue` that skipped the fetched counter. Changes: - Move fetched++ before the includeMessages block so all items count - Let message fetch failures fall through instead of skipping the item - Add a note to output when some items lack message content - Fall back to metadata CSV when all message fetches fail Fixes: 4 of 11 saved items silently dropped on enterprise Slack Made-with: Cursor
The README had documentation for activity_unreads and activity_mark_read which belong to the separate feat/activity-tools branch (PR korotovsky#229). Renumber saved-items tools to 16-18. Made-with: Cursor
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
Three new tools for managing Slack's "Save for Later" panel:
saved_list— Returns saved items via Slack'ssaved.listAPI with optional message content. Supports filtering by state (saved/completed/archived), auto-pagination, and graceful fallback when message content is unavailable (e.g. channel access denied on Enterprise Grid).saved_update— Updates a saved item viasaved.updateAPI: mark as completed or set a due date/reminder. Acceptsitem_idandtsfromsaved_listoutput.saved_clear_completed— Bulk-clears all completed saved items viasaved.clearCompletedAPI.Motivation
Slack deprecated the
stars.*APIs in March 2023 (changelog), replacing them with the "Save for Later" panel. There's currently no MCP tool to interact with saved items. This PR closes that gap — enabling workflows like reviewing saved items, marking tasks as done, and clearing completed items programmatically.Design
All three tools require browser session tokens (
xoxc/xoxd). They are not registered for OAuth (xoxp) or bot (xoxb) tokens — guarded by!IsBotToken() && !IsOAuth().The
saved_listhandler includes Tier 3 rate limiting, auto-pagination, and a thread-reply fallback strategy: if a saved message can't be fetched viaconversations.history(e.g. access denied), it triesconversations.replies, and ultimately falls back to a placeholder message rather than silently dropping the item.The diff is purely additive — 648 insertions, 0 deletions. No changes to existing tools or behavior.
pkg/handler/saved.goSavedListHandler,SavedUpdateHandler,SavedClearCompletedHandlerpkg/handler/saved_test.gopkg/provider/edge/saved.gosaved.list,saved.update,saved.clearCompletedpkg/provider/api.goSlackAPIinterface + wrapperspkg/server/server.gopkg/server/server_test.goValidToolNamesassertionsREADME.mdToken Compatibility
saved_listsaved_updatesaved_clear_completedxoxc/xoxdxoxpxoxbThe
saved.*endpoints are undocumented browser-session APIs — they reject non-xoxctokens withnot_allowed_token_type, similar toclient.counts.Status
Tested locally on Enterprise Grid workspace with
xoxc/xoxdtokens. Interested in feedback on:saved_list/saved_update/saved_clear_completedvs alternativessaved_listwhen message fetch fails; is this the right level of resilience?xoxc/xoxdtokens in CIMade with Cursor