Skip to content

Show notification for unknown MCP tools after 8 extension opens#317

Merged
rajbos merged 3 commits intomainfrom
copilot/add-unknown-tools-notification
Mar 1, 2026
Merged

Show notification for unknown MCP tools after 8 extension opens#317
rajbos merged 3 commits intomainfrom
copilot/add-unknown-tools-notification

Conversation

Copy link
Contributor

Copilot AI commented Mar 1, 2026

When unknown MCP tools are detected (tools with no friendly name mapping), surface a dismissable VS Code notification that navigates the user to the Usage Analysis view and highlights the "Report Unknown Tools" button. Notification is gated behind 8 extension opens to avoid noise before the user has meaningful usage data.

Extension (src/extension.ts)

  • getUnknownMcpToolsFromStats() — collects MCP tool IDs across all three time periods and filters for any not present in toolNameMap
  • showUnknownMcpToolsBanner() — dismissable notification with its own independent open counter (extension.unknownMcpOpenCount, threshold: 8) and dismissed key (news.unknownMcpTools.v1.dismissed); on "Open Usage Analysis" click, opens the panel then posts highlightUnknownTools to the webview after a 500ms render delay
  • Called after showFluencyScoreNewsBanner() in all three startup paths

Webview (src/webview/usage/main.ts)

  • Adds id="unknown-mcp-tools-section" to the unknown tools container so it can be targeted
  • Handles incoming highlightUnknownTools message: smooth-scrolls to the element and applies a 2-second var(--vscode-focusBorder) glow
case 'highlightUnknownTools': {
    const el = document.getElementById('unknown-mcp-tools-section');
    if (el) {
        el.scrollIntoView({ behavior: 'smooth', block: 'center' });
        el.style.transition = 'box-shadow 0.3s ease';
        el.style.boxShadow = '0 0 0 3px var(--vscode-focusBorder)';
        setTimeout(() => { el.style.boxShadow = ''; }, 2000);
    }
    break;
}

A separate counter is used (rather than reusing extension.openCount) because that counter stops incrementing once the fluency banner is dismissed.


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Co-authored-by: rajbos <6085745+rajbos@users.noreply.github.com>
Copilot AI changed the title [WIP] Add notification for unknown MCP tools in usage analysis view Show notification for unknown MCP tools after 8 extension opens Mar 1, 2026
@rajbos rajbos marked this pull request as ready for review March 1, 2026 11:55
@rajbos rajbos enabled auto-merge March 1, 2026 12:19
@rajbos rajbos merged commit a293492 into main Mar 1, 2026
12 checks passed
@rajbos rajbos deleted the copilot/add-unknown-tools-notification branch March 1, 2026 12:21
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.

2 participants