Skip to content

Commit 049a91c

Browse files
committed
fix(cortex-cli): consolidate mcp list command with ls alias
Fixes bounty issue #1399 The mcp subcommands had both 'list' and 'ls' as separate variants in the McpSubcommand enum. This caused the help output to show them as separate commands instead of documenting 'ls' as an alias for 'list'. This fix removes the redundant Ls variant and adds visible_alias='ls' to the List variant so the help correctly shows 'ls' as an alias.
1 parent 771ba8f commit 049a91c

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

cortex-cli/src/mcp_cmd.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -256,11 +256,8 @@ pub struct McpCli {
256256
#[derive(Debug, clap::Subcommand)]
257257
pub enum McpSubcommand {
258258
/// List configured MCP servers.
259-
List(ListArgs),
260-
261-
/// List configured MCP servers (alias for list).
262259
#[command(visible_alias = "ls")]
263-
Ls(ListArgs),
260+
List(ListArgs),
264261

265262
/// Show details for a configured MCP server.
266263
Get(GetArgs),
@@ -443,7 +440,7 @@ impl McpCli {
443440
} = self;
444441

445442
match subcommand {
446-
McpSubcommand::List(args) | McpSubcommand::Ls(args) => run_list(args).await,
443+
McpSubcommand::List(args) => run_list(args).await,
447444
McpSubcommand::Get(args) => run_get(args).await,
448445
McpSubcommand::Add(args) => run_add(args).await,
449446
McpSubcommand::Remove(args) => run_remove(args).await,

0 commit comments

Comments
 (0)