Skip to content

Commit c24c74f

Browse files
factorydroidFactory Bot
authored andcommitted
fix(mcp): add example to server name validation error message
Fixes bounty issue #1604 The error message for invalid MCP server names now includes an example ('my-server') to help users understand the expected format.
1 parent 1bd743b commit c24c74f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

cortex-cli/src/mcp_cmd.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -954,7 +954,7 @@ fn validate_server_name(name: &str) -> Result<()> {
954954
.all(|c| c.is_ascii_alphanumeric() || c == '-' || c == '_');
955955

956956
if !is_valid_chars {
957-
bail!("invalid server name '{name}' (use ASCII letters a-z/A-Z, digits 0-9, '-', or '_')");
957+
bail!("invalid server name '{name}' (use ASCII letters a-z/A-Z, digits 0-9, '-', or '_'); example: 'my-server'");
958958
}
959959

960960
// Must start with a letter or underscore

0 commit comments

Comments
 (0)