Edit a formula's lines
edit_formulaUse this when the user wants to change a formula on their bench: add or remove a material, set an amount or a bottle strength, swap a material, flag or note a line, reorder, or scale the whole formula. Changes the working copy in place, as one hand edit in the editor does. No version is made; undo_last_change reverses the change, save_version keeps a version when the user asks. Only when a batch was made from the working copy does the first change start one new working version (the result says so). A formula open in the app updates within seconds. Lines are named by material or id. For add/set_amount always specify unit: g is a weighed amount; % is the final weighed share of the whole formula (including solvent, not the pure aromatic relative/absolute percent). Other weighed lines are held fixed; several % targets are solved together. Never copy relativePct or absolutePct as grams. Read get_formula first and use weighedPct for this kind of percentage edit.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| formula | Yes | The formula: its id (from list_formulas) or its exact name. | |
| operations | Yes |