Skip to content

feat(slack): Slack MCP tools — bridge Connections panel to agent-usable operations - #1055

Closed
jeonghun-jj-lee wants to merge 4 commits into
mainfrom
jj/1037-slack-mcp-tools
Closed

jeonghun-jj-lee wants to merge 4 commits into
mainfrom
jj/1037-slack-mcp-tools

Conversation

@jeonghun-jj-lee

Copy link
Copy Markdown
Contributor

Implements #1037 (all three sub-issues: #1039, #1040, #1041). Companion: ADR 0016.

Three MCP tools that read the Slack credential from the Connections panel and give the agent channel/DM/user access:

  • slack_api.ts — shared module: slackPreCheck, slackFetch, UserCache, ChannelCache, resolveTarget, formatMessages, resolveHandles. Injectable fetchImpl throughout.
  • amicode_slack_list — list channels or users with optional query filter
  • amicode_slack_read — read channel history, thread replies, or DM overview
  • amicode_slack_send — post as bot with @handle resolution, DM opening, not_in_channel hints
  • amico-slack SKILL.md — rewritten to reference MCP tools instead of the unshipped CLI

Always visible in schema; returns not_connected with a hint when Slack isn't configured. 74 tests (35 shared module + 17 tool behavioral + 21 pinning/parity + 5 MCP parity).

Closes #1039, closes #1040, closes #1041. Refs #1037.

…get resolution, formatting

Implements #1039. Foundation for the three Slack MCP tools (#1037).
…y noUnusedLocals

The parameter is kept for API consistency (callers may pass it) but the
function delegates to UserCache which has its own fetchImpl from construction.
…k_send MCP tools

Register three Slack MCP tools in AMICODE_TOOLS that bridge the Connections
panel credential to agent-usable Slack operations.

- amicode_slack_list: list channels or users, with optional query filter
- amicode_slack_read: read channel history, thread replies, or DM overview
- amicode_slack_send: send messages to channels or users, with thread support

Each tool gates on slackPreCheck (credential existence via readCredential),
uses the shared slack_api.ts HTTP layer (slackFetch, resolveTarget,
formatMessages, resolveHandles, UserCache, ChannelCache), and returns
structured JSON errors or formatted text.

The plugin twin (opencode-plugin/amicode_tools.ts) uses lazy imports for
the ../src modules per the deployment contract (#995).

Implements #1040. Part of #1037.
Replace CLI command references with the three Slack MCP tools
(amicode_slack_read, amicode_slack_send, amicode_slack_list).
Preserves mrkdwn formatting and LaTeX-to-Unicode guidance.

Closes #1041. Part of #1037.
@jeonghun-jj-lee jeonghun-jj-lee added the enhancement New feature or request label Sep 13, 2026
@jeonghun-jj-lee jeonghun-jj-lee self-assigned this Sep 13, 2026
@coderabbitai

coderabbitai Bot commented Sep 13, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

1 participant