{"record":{"id":"2a6a0287ecc5eaec","repo":"multica-ai/multica","slug":"nothing-to-update-pass-name-and-or-one-of-ser","errorCode":null,"errorMessage":"nothing to update; pass --name and/or one of --server-config, --server-config-stdin, --server-config-file","messagePattern":"nothing to update; pass --name and/or one of --server-config, --server-config-stdin, --server-config-file","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"server/cmd/multica/cmd_workspace.go","lineNumber":694,"sourceCode":"\t}\n\tif wsID == \"\" {\n\t\treturn fmt.Errorf(\"workspace ID is required: pass an id/slug/prefix as argument or set MULTICA_WORKSPACE_ID\")\n\t}\n\n\tbody := map[string]any{}\n\tif cmd.Flags().Changed(\"name\") {\n\t\tname, _ := cmd.Flags().GetString(\"name\")\n\t\tbody[\"name\"] = strings.TrimSpace(name)\n\t}\n\tentry, ok, err := resolveMcpJSONObject(cmd, \"server-config\", false)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif ok {\n\t\tbody[\"config\"] = entry\n\t}\n\tif len(body) == 0 {\n\t\treturn fmt.Errorf(\"nothing to update; pass --name and/or one of --server-config, --server-config-stdin, --server-config-file\")\n\t}\n\n\tclient, err := newAPIClient(cmd)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tctx, cancel := cli.APIContext(context.Background())\n\tdefer cancel()\n\n\tvar server workspaceMcpServer\n\tpath := \"/api/workspaces/\" + wsID + \"/mcp-servers/\" + url.PathEscape(serverID)\n\tif err := client.PutJSON(ctx, path, body, &server); err != nil {\n\t\treturn fmt.Errorf(\"update workspace mcp server: %w\", err)\n\t}\n\n\treturn printWorkspaceMcpServers(cmd, []workspaceMcpServer{server})\n}","sourceCodeStart":676,"sourceCodeEnd":712,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/cmd/multica/cmd_workspace.go#L676-L712","documentation":"Local validation in `multica workspace mcp update`: the PATCH-like body is empty because neither --name was changed nor a --server-config/--server-config-stdin/--server-config-file entry was supplied. A PUT with an empty body would be a no-op, so the CLI rejects it up front.","triggerScenarios":"Running `multica workspace mcp update <id> <ws>` with no flags; setting --name to its current value does count as Changed, but omitting every flag leaves body empty and triggers this.","commonSituations":"Using update to inspect a server (use `mcp list` instead); flags accidentally quoted into one argument (`\"--name x\"`); config flags with empty values that resolveMcpJSONObject discards.","solutions":["Pass --name and/or a server-config source: `multica workspace mcp update 17 acme --name prod --server-config-file ./v2.json`","Check that each flag is spelled and spaced correctly so cobra registers it as Changed","To view current servers, run `multica workspace mcp list <ws>`"],"exampleFix":"# before\nmultica workspace mcp update 17 acme\n\n# after\nmultica workspace mcp update 17 acme --server-config-file ./server-v2.json","handlingStrategy":"validation","validationCode":"if len(body) == 0 {\n    return errors.New(\"nothing to update; pass --name and/or a server-config source\")\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use `mcp list` to view and `mcp update --name/--server-config-file` to change","Ensure at least one flag is genuinely present on the command line","Quote flags correctly so cobra parses them as flags, not positionals"],"tags":["cli","validation","mcp","usage"],"backgroundTag":null,"analyzedSha":"2c0912b6ec764b373d44eeea1e80f0d9f11ab417","analyzedAt":"2026-08-15T13:25:18.241Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}