write_formula
Write Excel formulas or values into a single cell. Protects existing formulas with overwrite control and supports dry runs for safety.
Instructions
ModelRisk: Write an arbitrary formula or value into a single cell. Use this for wiring cells (e.g. =A1*B1, =SUM(...), =IF(...), or links to other sheets) that aren't covered by the Vose-specific tools. Safety: refuses to overwrite a cell containing an existing formula unless allow_overwrite=True — that protects user-written formulas AND prior Vose distributions. Empty cells write freely. Defaults to dry_run=True; pass dry_run=False to commit. Every commit appends to the audit log so restore_cell can roll back.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cell | Yes | A1 cell reference like 'C1'. | |
| sheet | Yes | ||
| dry_run | No | ||
| formula | Yes | Formula or value to write. Excel-style; leading '=' is optional (we'll add it if missing for non-numeric content). | |
| workbook | Yes | ||
| allow_overwrite | No | Permit overwriting a non-empty cell. Required if the cell already has any content. Without this flag the tool refuses and returns the existing formula so Claude can decide what to do. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cell | Yes | ||
| formula | Yes | ||
| written | Yes | ||
| previous_formula | No |