multica-ai/multica · error

no fields to update; use --name, --description, --content, o

Error message

no fields to update; use --name, --description, --content, or --config

What it means

Validation in `multica skill update <id>`: after collecting optional fields (--name, --description, --content, --config), the request body map is empty, meaning no field was actually provided. The CLI refuses to send an empty PUT because it would be a no-op at best and ambiguous at worst. Note that --content with empty bytes is rejected earlier by the empty-content check, so this specifically means no flags changed anything.

Source

Thrown at server/cmd/multica/cmd_skill.go:376

	}
	content, hasContent, err := resolveSkillContentFlag(cmd)
	if err != nil {
		return err
	}
	if hasContent {
		body["content"] = content
	}
	if cmd.Flags().Changed("config") {
		v, _ := cmd.Flags().GetString("config")
		var config any
		if err := json.Unmarshal([]byte(v), &config); err != nil {
			return fmt.Errorf("--config must be valid JSON: %w", err)
		}
		body["config"] = config
	}

	if len(body) == 0 {
		return fmt.Errorf("no fields to update; use --name, --description, --content, or --config")
	}

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

	var result map[string]any
	if err := client.PutJSON(ctx, "/api/skills/"+args[0], body, &result); err != nil {
		return fmt.Errorf("update skill: %w", err)
	}

	output, _ := cmd.Flags().GetString("output")
	if output == "json" {
		return cli.PrintJSON(os.Stdout, result)
	}

	fmt.Printf("Skill updated: %s (%s)\n", strVal(result, "name"), strVal(result, "id"))
	return nil
}

View on GitHub (pinned to 2c0912b6ec)

Solutions

  1. Include at least one field flag: --name, --description, --content/--content-file/--content-stdin, or --config.
  2. In scripts, assert at least one update variable is set before invoking multica.
  3. Use `multica skill get <id>` first to see current values and decide what to change.

Example fix

# before
multica skill update abc123
# after
multica skill update abc123 --description 'New description'
Defensive patterns

Strategy: validation

Validate before calling

# Assert at least one update field is set before invoking
[ -n "$NAME$DESC$CONFIG" ] || [ -n "$CONTENT_FILE" ] || { echo "no fields to update"; exit 2; }
multica skill update "$SKILL_ID" ${NAME:+--name "$NAME"} ${DESC:+--description "$DESC"} ${CONFIG:+--config "$CONFIG"} ${CONTENT_FILE:+--content-file "$CONTENT_FILE"}

Try / catch

Match 'no fields to update' and surface it as a usage bug in the caller (missing arguments), not a server problem; nothing was sent, so no rollback is needed.

Prevention

When it happens

Trigger: Running `multica skill update <id>` with no field flags at all, or with flags whose values are empty strings that the collection code skips.

Common situations: Scripts passing update flags conditionally where every condition evaluated false; interactive users expecting update to open an editor; copy-pasted create commands with the field flags removed.

Related errors


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