multica-ai/multica · warning

nothing to update; pass --name and/or one of --server-config

Error message

nothing to update; pass --name and/or one of --server-config, --server-config-stdin, --server-config-file

What it means

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.

Source

Thrown at server/cmd/multica/cmd_workspace.go:694

	}
	if wsID == "" {
		return fmt.Errorf("workspace ID is required: pass an id/slug/prefix as argument or set MULTICA_WORKSPACE_ID")
	}

	body := map[string]any{}
	if cmd.Flags().Changed("name") {
		name, _ := cmd.Flags().GetString("name")
		body["name"] = strings.TrimSpace(name)
	}
	entry, ok, err := resolveMcpJSONObject(cmd, "server-config", false)
	if err != nil {
		return err
	}
	if ok {
		body["config"] = entry
	}
	if len(body) == 0 {
		return fmt.Errorf("nothing to update; pass --name and/or one of --server-config, --server-config-stdin, --server-config-file")
	}

	client, err := newAPIClient(cmd)
	if err != nil {
		return err
	}

	ctx, cancel := cli.APIContext(context.Background())
	defer cancel()

	var server workspaceMcpServer
	path := "/api/workspaces/" + wsID + "/mcp-servers/" + url.PathEscape(serverID)
	if err := client.PutJSON(ctx, path, body, &server); err != nil {
		return fmt.Errorf("update workspace mcp server: %w", err)
	}

	return printWorkspaceMcpServers(cmd, []workspaceMcpServer{server})
}

View on GitHub (pinned to 2c0912b6ec)

Solutions

  1. Pass --name and/or a server-config source: `multica workspace mcp update 17 acme --name prod --server-config-file ./v2.json`
  2. Check that each flag is spelled and spaced correctly so cobra registers it as Changed
  3. To view current servers, run `multica workspace mcp list <ws>`

Example fix

# before
multica workspace mcp update 17 acme

# after
multica workspace mcp update 17 acme --server-config-file ./server-v2.json
Defensive patterns

Strategy: validation

Validate before calling

if len(body) == 0 {
    return errors.New("nothing to update; pass --name and/or a server-config source")
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of multica-ai/multica@2c0912b6ec (2026-08-15). Data as JSON: /api/errors/2a6a0287ecc5eaec. Report an issue: GitHub.