scenario
Save, list, and apply what-if value sets to test different outcomes in Excel workbooks. Add named cell-value sets per sheet, then apply them later.
Instructions
Manage saved scenarios (what-if value sets) persisted in a hidden sheet.
Args:
action: "add", "list", or "apply".
- "add": requires name and cell_values — a nested dict mapping sheet name to {cell_ref: value},
e.g. {"Sheet1": {"A1": 100, "B2": 200}, "Sheet2": {"C3": "hello"}}.
- "list": returns available scenarios.
- "apply": requires name and will write stored cell values into the workbook (destructive).
file_path: Workbook path.
name: Scenario name for add/apply.
cell_values: Nested dict mapping sheet_name → {cell_ref: scalar_value} for "add".
description: Optional free-text description.
Returns: str | list[ScenarioInfo] | ScenarioApplyResult
Notes:
- Scenarios are stored in a hidden _mcp_scenarios sheet — mention potential
user-visible side-effects when users open the workbook.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | ||
| action | Yes | ||
| file_path | Yes | ||
| cell_values | No | ||
| description | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |