Skip to content

Add per-tool suppression for unknown tool name notifications (#560)#563

Merged
rajbos merged 1 commit intomainfrom
feature/suppress-unknown-tool-names
Apr 10, 2026
Merged

Add per-tool suppression for unknown tool name notifications (#560)#563
rajbos merged 1 commit intomainfrom
feature/suppress-unknown-tool-names

Conversation

@rajbos
Copy link
Copy Markdown
Owner

@rajbos rajbos commented Apr 8, 2026

Closes #560

Summary

Users can now suppress individual tool names from the Unknown Tools Found section in the Usage Analysis dashboard. This is useful when testing a new MCP server that doesn't yet have a friendly display name, without losing visibility into other unrecognised tools.

Changes

vscode-extension/package.json

  • Added new setting copilotTokenTracker.suppressedUnknownTools (array of strings, default []) with a clear description.

vscode-extension/src/extension.ts

  • getUsageAnalysisHtml() — reads suppressedUnknownTools from VS Code settings and injects it into __INITIAL_USAGE__.
  • Message handler in showUsageAnalysis() — handles the new suppressUnknownTool webview message: appends the tool name to the setting (global scope) and refreshes the panel.

vscode-extension/src/webview/usage/main.ts

  • UsageAnalysisStats — extended with optional suppressedUnknownTools?: string[].
  • getUnknownMcpTools() — filters out suppressed tool names before returning the list.
  • Unknown tool chip — each chip now renders a 🔇 button (data-suppress-tool attribute); event delegation in bootstrap() posts suppressUnknownTool to the extension host.

How it works

  1. User sees an unknown tool name in the Unknown Tools Found section.
  2. They click the 🔇 button next to that tool.
  3. The extension adds the tool name to copilotTokenTracker.suppressedUnknownTools in VS Code global settings and refreshes the dashboard.
  4. The tool no longer appears in the section; all other unrecognised tools remain visible.
  5. Users can remove a name from the setting at any time via VS Code Settings to make it reappear.

Closes #560

Users can now suppress individual tool names from the 'Unknown Tools
Found' section in the Usage Analysis dashboard. This is useful when
testing a new MCP server that does not yet have a friendly display name,
without losing visibility into other unrecognised tools.

Changes:
- Added new VS Code setting copilotTokenTracker.suppressedUnknownTools
  (string array, default []) in package.json
- extension.ts: passes suppressedUnknownTools from settings into the
  __INITIAL_USAGE__ initial data payload; handles the new
  suppressUnknownTool webview message, updating the setting and
  refreshing the panel
- webview/usage/main.ts: extends UsageAnalysisStats type with the field;
  getUnknownMcpTools() filters out suppressed names; each tool chip now
  renders a mute (🔇) button that posts suppressUnknownTool to the host

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@rajbos rajbos merged commit 7a051d6 into main Apr 10, 2026
16 checks passed
@rajbos rajbos deleted the feature/suppress-unknown-tool-names branch April 10, 2026 14:23
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.

Add abbility to suppress an unknown tool from the popup

1 participant