write_formula
Write custom Excel formulas or values into a single cell. Safeguards existing formulas by preventing overwrites unless explicitly allowed, with dry-run preview before committing.
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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"workbook": "<workbook>",
"sheet": "<sheet>",
"cell": "<cell>",
"formula": "<formula>"
},
"name": "write_formula"
}
}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 |