-
Notifications
You must be signed in to change notification settings - Fork 374
Resolve CLI help consistency gaps across init, trial, mcp add, and logs
#27861
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -157,15 +157,19 @@ This is a test workflow. | |
| } | ||
| } | ||
|
|
||
| func TestMCPAddTransportFlagDescriptionUsesLowercaseDocker(t *testing.T) { | ||
| func TestMCPAddTransportFlagDescriptionIncludesCapitalizedHTTPAndDocker(t *testing.T) { | ||
| cmd := NewMCPAddSubcommand() | ||
| transportFlag := cmd.Flags().Lookup("transport") | ||
| if transportFlag == nil { | ||
| t.Fatal("expected --transport flag to exist") | ||
| } | ||
|
|
||
| if !strings.Contains(transportFlag.Usage, "docker") { | ||
| t.Fatalf("expected --transport usage to include docker, got: %s", transportFlag.Usage) | ||
| if !strings.Contains(transportFlag.Usage, "HTTP") { | ||
| t.Fatalf("expected --transport usage to include HTTP, got: %s", transportFlag.Usage) | ||
| } | ||
|
|
||
| if !strings.Contains(transportFlag.Usage, "Docker") { | ||
| t.Fatalf("expected --transport usage to include Docker, got: %s", transportFlag.Usage) | ||
| } | ||
| } | ||
|
Comment on lines
+160
to
174
|
||
|
|
||
|
|
||
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.
The --transport help text lists values "HTTP" and "Docker", but the implementation only accepts lowercase values (see createMCPToolConfig switch on preferredTransport: "stdio", "http", "docker"). As written, users following the help and passing "--transport HTTP" or "--transport Docker" will get an unsupported transport error. Either keep the help values lowercase, or normalize the flag value (e.g., strings.ToLower) and update the error message so the documented values are actually accepted.