Skip to content

Commit fdff800

Browse files
factorydroidechobt
authored andcommitted
fix(mcp): clarify ASCII-only requirement in server name validation error
Fixes bounty issue #1626 The validate_server_name function uses is_ascii_alphanumeric() but the error message only mentioned 'letters, numbers' without specifying ASCII-only. Users trying unicode names like 'test-日本語' received a generic error without understanding why unicode characters were rejected. Updated the error message to explicitly state 'ASCII letters a-z/A-Z, digits 0-9' so users understand the limitation.
1 parent b578b52 commit fdff800

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cortex-cli/src/mcp_cmd.rs

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

959959
if !is_valid_chars {
960-
bail!("invalid server name '{name}' (use letters, numbers, '-', '_')");
960+
bail!("invalid server name '{name}' (use ASCII letters a-z/A-Z, digits 0-9, '-', or '_')");
961961
}
962962

963963
// Must start with a letter or underscore

0 commit comments

Comments
 (0)