-
Notifications
You must be signed in to change notification settings - Fork 221
List tools command to list MCP tools, description and CLI command #13030
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR introduces a new list command to enumerate all available MCP tools along with their descriptions and CLI command syntax. The implementation adds a custom McpCommand class that extends the standard Command class to associate each CLI command with its corresponding MCP tool name, enabling better tool discovery and documentation.
Key changes:
- Added
McpCommandclass to link CLI commands with MCP tool names - Implemented
ListCommandToolto traverse the command tree and display all available tools - Updated all existing tool commands to use
McpCommandinstead ofCommand
Reviewed changes
Copilot reviewed 31 out of 31 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| Commands/McpCommand.cs | New command class extending System.CommandLine.Command with MCP tool name property |
| Models/ToolInfo.cs | Data model to hold tool name, description, and CLI command information |
| Models/Responses/ToolListResponse.cs | Formats tool list as a markdown-style table for display |
| Tools/Core/ListCommandTool.cs | Implements list command by traversing command tree and querying registered MCP tools |
| Program.cs | Moves MCP tool registration earlier to support both CLI and MCP server modes |
| Commands/SharedOptions.cs | Registers ListCommandTool with the tool registry |
| All other tool files | Updated to use McpCommand constructor with MCP tool name parameter |
tools/azsdk-cli/Azure.Sdk.Tools.Cli/Tools/Core/ListCommandTool.cs
Outdated
Show resolved
Hide resolved
tools/azsdk-cli/Azure.Sdk.Tools.Cli/Tools/Core/ListCommandTool.cs
Outdated
Show resolved
Hide resolved
tools/azsdk-cli/Azure.Sdk.Tools.Cli/Tools/Core/ListCommandTool.cs
Outdated
Show resolved
Hide resolved
tools/azsdk-cli/Azure.Sdk.Tools.Cli/Models/Responses/ToolListResponse.cs
Outdated
Show resolved
Hide resolved
tools/azsdk-cli/Azure.Sdk.Tools.Cli/Models/Responses/ToolListResponse.cs
Outdated
Show resolved
Hide resolved
tools/azsdk-cli/Azure.Sdk.Tools.Cli/Tools/Core/ListCommandTool.cs
Outdated
Show resolved
Hide resolved
tools/azsdk-cli/Azure.Sdk.Tools.Cli/Tools/EngSys/Cleanup/CleanupTool.cs
Outdated
Show resolved
Hide resolved
tools/azsdk-cli/Azure.Sdk.Tools.Cli/Tools/Core/ListCommandTool.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/microsoft/mcp/blob/main/eng/tools/ToolDescriptionEvaluator/tools.json
Is this list command tool able to return metadata like options. I need the json file generated to look like this.
This PR adds CLI command to list all MCP tools, description and CLI command in Az SDK MCP server.
usage:
azsdk list -o json(to get json output)azsdk list