apply_workbook_changeset
Preview or commit an assertion-backed group of workbook mutations as a single transaction, with validation and snapshot options for safer XLSX edits.
Instructions
Preview or commit an assertion-backed group of workbook mutations as one transaction.
Each operation is {"tool": "name", "args": {...}}. Supported tool names are
create_worksheet, write_data_to_excel, format_range, format_ranges, freeze_panes,
set_autofilter, set_column_widths, set_row_heights, autofit_columns, create_table,
and create_chart. Assertions support sheet_exists, cell_equals, range_equals,
range_values_unchanged, table_exists, freeze_panes_equals, autofilter_equals,
chart_exists, and no_cell_ref_errors.
Operations inherit the outer filepath. Omit filepath, dry_run and
include_changes from operation args; one ChangeSet cannot target other files.
Call preview first. Commit the identical plan with expected_workbook_sha256 and
changeset_token from that preview. Snapshot creation defaults to enabled.
A custom snapshot must be a separate file, not an alias or hardlink of filepath.
Inspect package_fidelity: custom XML or untouched formula-cache loss blocks
commit. The check is targeted, not a guarantee of full Excel round-trip fidelity.
save_mode="preserve" patches only literal cell writes in a restricted XLSX.
Unsupported workbook features or formulas block the save; no standard fallback.
Use the same save_mode in preview and commit.
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": {
"filepath": "<filepath>",
"operations": "<operations>"
},
"name": "apply_workbook_changeset"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | preview | |
| filepath | Yes | Reuse supplied server path; NEVER prepend client cwd. Rooted: relative OK; unrooted stdio: absolute, ask if missing. | |
| save_mode | No | standard | |
| assertions | No | ||
| operations | Yes | ||
| sample_limit | No | ||
| changeset_token | No | ||
| create_snapshot | No | ||
| snapshot_filepath | No | ||
| expected_workbook_sha256 | No |