Remove unused NewMCPInspectCommand function#3767
Merged
Merged
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Remove unused NewMCPInspectCommand function
Remove unused NewMCPInspectCommand function
Nov 12, 2025
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR removes dead code from the MCP inspect command implementation. The NewMCPInspectCommand() function was a leftover artifact from when the command was restructured from a top-level command into a subcommand under mcp. The removal is safe and improves code maintainability.
Key changes:
- Removed the unused
NewMCPInspectCommand()function (66 lines) - Retained
NewMCPInspectSubcommand()which is actively used in the command hierarchy - Reduced file size by 11% (601 → 535 lines)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The file
pkg/cli/mcp_inspect.gocontained duplicate command constructors from a refactoring where the MCP inspect command was moved from top-level to a subcommand.Changes
NewMCPInspectCommand()(66 lines) - never referenced in codebaseNewMCPInspectSubcommand()- active implementation used inpkg/cli/mcp.go:32Both functions were functionally identical with the same flags, descriptions, and examples. The unused function was leftover dead code from the command hierarchy restructuring.
File reduction: 601 → 535 lines (11% decrease)
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.