yt-slack-mcp 0.3.1 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +6 -4
  2. package/index.js +18 -8
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -8,7 +8,7 @@ A host-agnostic [Model Context Protocol](https://modelcontextprotocol.io) server
8
8
  - Read message permalinks from channels, DMs, and group DMs.
9
9
  - Return image attachments inline, extract text from PDFs, and return `text/*` attachment contents inline.
10
10
  - Retrieve private attachment contents through the authenticated Slack browser session.
11
- - Reply to a thread, add a reaction, edit an authored message or thread reply, or upload local files only in explicitly allowed channel IDs.
11
+ - Reply to a thread, add or remove a reaction, edit an authored message or thread reply, or upload local files only in explicitly allowed channel IDs.
12
12
 
13
13
  Attachment limits: images and text files are limited to 10 MB; text attachments are truncated at 100,000 characters. PDFs are limited to 20 MB, 50 pages, and 100,000 extracted characters.
14
14
 
@@ -21,6 +21,7 @@ Attachment limits: images and text files are limited to 10 MB; text attachments
21
21
  | `slack_get_history` | Read recent channel history. |
22
22
  | `slack_reply_to_thread` | Reply to a thread; restricted to allowed channels. |
23
23
  | `slack_add_reaction` | Add a reaction; restricted to allowed channels. |
24
+ | `slack_remove_reaction` | Remove a reaction added by this account; restricted to allowed channels. |
24
25
  | `slack_upload_files` | Upload up to 10 local files to a channel or thread, with an optional initial comment; returns file and message permalinks; restricted to allowed channels. |
25
26
  | `slack_edit_message` | Edit an authored message or thread reply by channel ID and timestamp; replaces the message text (Slack removes any existing Block Kit blocks) and returns the updated timestamp and permalink; restricted to allowed channels. |
26
27
 
@@ -60,9 +61,10 @@ All configuration can live in a JSON config file at
60
61
  ```
61
62
 
62
63
  By default the write tools (`slack_reply_to_thread`, `slack_add_reaction`,
63
- `slack_edit_message`) and `slack_upload_files` are locked down — no channel is
64
- writable. Each upload is limited to 10 MB. Every field is optional; a
65
- missing file just means defaults. Env vars always override the config file.
64
+ `slack_remove_reaction`, `slack_edit_message`) and `slack_upload_files` are
65
+ locked down — no channel is writable. Each upload is limited to 10 MB. Every
66
+ field is optional; a missing file just means defaults. Env vars always override
67
+ the config file.
66
68
 
67
69
  ## Configuration
68
70
 
package/index.js CHANGED
@@ -419,43 +419,41 @@ const TOOLS = [
419
419
  name: "slack_read_permalink",
420
420
  description: "Read a Slack message or thread from a permalink, including inline text files, extracted PDFs, and images.",
421
421
  inputSchema: zodToJsonSchema(ReadPermalinkSchema),
422
- annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true },
423
422
  },
424
423
  {
425
424
  name: "slack_get_replies",
426
425
  description: "Read replies for a Slack thread by channel id and thread timestamp.",
427
426
  inputSchema: zodToJsonSchema(GetRepliesSchema),
428
- annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true },
429
427
  },
430
428
  {
431
429
  name: "slack_get_history",
432
430
  description: "Read recent Slack channel history.",
433
431
  inputSchema: zodToJsonSchema(GetHistorySchema),
434
- annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true },
435
432
  },
436
433
  {
437
434
  name: "slack_reply_to_thread",
438
435
  description: "Reply to a Slack thread. Restricted to allowed channels.",
439
436
  inputSchema: zodToJsonSchema(ReplyToThreadSchema),
440
- annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: true },
441
437
  },
442
438
  {
443
439
  name: "slack_add_reaction",
444
440
  description: "Add a reaction to a Slack message. Restricted to allowed channels.",
445
441
  inputSchema: zodToJsonSchema(AddReactionSchema),
446
- annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: true },
442
+ },
443
+ {
444
+ name: "slack_remove_reaction",
445
+ description: "Remove a reaction added by this account from a Slack message. Restricted to allowed channels.",
446
+ inputSchema: zodToJsonSchema(AddReactionSchema),
447
447
  },
448
448
  {
449
449
  name: "slack_upload_files",
450
450
  description: "Upload one or more local files to a channel or thread. Restricted to allowed channels.",
451
451
  inputSchema: zodToJsonSchema(UploadFilesSchema),
452
- annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: true },
453
452
  },
454
453
  {
455
454
  name: "slack_edit_message",
456
455
  description: "Edit an authored Slack message or thread reply by channel id and timestamp. Replaces the message text; any existing Block Kit blocks are removed by Slack. Restricted to allowed channels.",
457
456
  inputSchema: zodToJsonSchema(EditMessageSchema),
458
- annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: true },
459
457
  },
460
458
  ];
461
459
 
@@ -519,6 +517,18 @@ function createExecuteToolCall({ slackApi, formatMessages, uploadSlackFiles, all
519
517
  return { content: [{ type: "text", text: "added reaction" }] };
520
518
  }
521
519
 
520
+ case "slack_remove_reaction": {
521
+ const a = AddReactionSchema.parse(args);
522
+ const channelId = requireString(a.channel_id, "channel_id");
523
+ assertAllowedWriteChannel(channelId, allowed);
524
+ await slackApi("reactions.remove", {
525
+ channel: channelId,
526
+ timestamp: requireString(a.timestamp, "timestamp"),
527
+ name: requireString(a.reaction, "reaction"),
528
+ }, "POST");
529
+ return { content: [{ type: "text", text: "removed reaction" }] };
530
+ }
531
+
522
532
  case "slack_upload_files": {
523
533
  const a = UploadFilesSchema.parse(args);
524
534
  const channelId = requireString(a.channel_id, "channel_id");
@@ -606,7 +616,7 @@ async function main() {
606
616
  {
607
617
  capabilities: { tools: {} },
608
618
  instructions:
609
- "MCP server for Slack. Read with slack_read_permalink, slack_get_replies, slack_get_history; write with slack_reply_to_thread, slack_add_reaction, slack_upload_files, slack_edit_message (restricted to allowed channels).",
619
+ "MCP server for Slack. Read with slack_read_permalink, slack_get_replies, slack_get_history; write with slack_reply_to_thread, slack_add_reaction, slack_remove_reaction, slack_upload_files, slack_edit_message (restricted to allowed channels).",
610
620
  }
611
621
  );
612
622
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "yt-slack-mcp",
3
- "version": "0.3.1",
4
- "description": "MCP server for Slack — read permalinks, threads, and channel history; reply to threads; add reactions; edit messages.",
3
+ "version": "0.4.0",
4
+ "description": "MCP server for Slack — read permalinks, threads, and channel history; reply to threads; add or remove reactions; edit messages.",
5
5
  "type": "module",
6
6
  "main": "index.js",
7
7
  "bin": {