{"record":{"id":"d9d229076e2c8681","repo":"multica-ai/multica","slug":"name-is-required-d9d229","errorCode":null,"errorMessage":"name is required","messagePattern":"name is required","errorType":"validation","errorClass":null,"httpStatus":400,"severity":"error","filePath":"server/internal/handler/workspace_mcp.go","lineNumber":183,"sourceCode":"\t}\n\tvar entry map[string]json.RawMessage\n\tif err := json.Unmarshal(trimmed, &entry); err != nil {\n\t\t// Never wrap: the underlying error can echo fragments of an entry that\n\t\t// routinely embeds API tokens.\n\t\treturn errors.New(\"config must be a JSON object\")\n\t}\n\tif len(entry) == 0 {\n\t\treturn errors.New(\"config must not be empty\")\n\t}\n\treturn nil\n}\n\n// validateWorkspaceMcpServerName checks a server name. The name is what the\n// runtime mounts the server under and what an agent's own config collides\n// with, so it follows the same rule the agent settings dialog enforces.\nfunc validateWorkspaceMcpServerName(name string) error {\n\tif name == \"\" {\n\t\treturn errors.New(\"name is required\")\n\t}\n\tfor _, r := range name {\n\t\tswitch {\n\t\tcase r >= 'a' && r <= 'z', r >= 'A' && r <= 'Z', r >= '0' && r <= '9', r == '-', r == '_':\n\t\tdefault:\n\t\t\treturn errors.New(\"name may only contain letters, digits, hyphens, and underscores\")\n\t\t}\n\t}\n\treturn nil\n}\n","sourceCodeStart":165,"sourceCodeEnd":194,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/internal/handler/workspace_mcp.go#L165-L194","documentation":"Validation guard in validateWorkspaceMcpServerName: the MCP server name was empty. The name is the mount path the runtime serves the MCP server under and collides with an agent's own config, so it follows the same rule as the agent settings dialog; empty names cannot be mounted.","triggerScenarios":"Thrown at server/internal/handler/workspace_mcp.go:183 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide a non-empty name for the MCP server."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2c0912b6ec764b373d44eeea1e80f0d9f11ab417","analyzedAt":"2026-08-15T13:25:18.241Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}