Skip to content

fix(gateway): make Slack platform note capability-aware when MCP tools present#6538

Open
ygd58 wants to merge 2 commits into
NousResearch:mainfrom
ygd58:fix-slack-platform-note
Open

fix(gateway): make Slack platform note capability-aware when MCP tools present#6538
ygd58 wants to merge 2 commits into
NousResearch:mainfrom
ygd58:fix-slack-platform-note

Conversation

@ygd58

@ygd58 ygd58 commented Apr 9, 2026

Copy link
Copy Markdown
Contributor

Fixes #6533

Problem

When Slack MCP tools are available at runtime, the gateway still injects a hardcoded platform note saying the agent has no Slack-specific API access. This causes false refusals even though Slack MCP tools are working.

Root Cause

build_session_context_prompt() had a hardcoded Slack platform note that always said Slack-specific APIs are unavailable, regardless of runtime tool availability.

Fix

  • Added available_tools: List[str] field to SessionContext
  • build_session_context() now accepts available_tools parameter
  • build_session_context_prompt() checks for Slack tools (e.g. mcp_slack_*) in available_tools
  • If Slack tools are present: injects a note acknowledging scoped tool access
  • If no Slack tools: keeps the existing conservative note (no behavior change)
  • run.py populates available_tools from get_all_tool_names() at message time

Files Changed

  • gateway/session.pySessionContext.available_tools field + capability-aware Slack note + build_session_context() signature
  • gateway/run.py — populate available_tools when building session context

@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/gateway Gateway runner, session dispatch, delivery platform/slack Slack app adapter tool/mcp MCP client and OAuth labels Apr 30, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Likely duplicate of #6545 — same fix for #6533 (Slack platform note capability-awareness when MCP tools present).

@alt-glitch

Copy link
Copy Markdown
Collaborator

Likely duplicate of #6545 — same fix for #6533.

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

Labels

comp/gateway Gateway runner, session dispatch, delivery P2 Medium — degraded but workaround exists platform/slack Slack app adapter tool/mcp MCP client and OAuth type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Slack gateway platform note becomes incorrect when Slack MCP tools are available

2 participants