Skip to main content
Glama
SheetForge MCP

SheetForge MCP

by iHeldan

apply_workbook_changeset

Destructive

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

NameRequiredDescriptionDefault
modeNopreview
filepathYesReuse supplied server path; NEVER prepend client cwd. Rooted: relative OK; unrooted stdio: absolute, ask if missing.
save_modeNostandard
assertionsNo
operationsYes
sample_limitNo
changeset_tokenNo
create_snapshotNo
snapshot_filepathNo
expected_workbook_sha256No

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.15.0
    • addedInput schema / properties / save_mode
      Added value: +{
      +  "default": "standard",
      +  "enum": [
      +    "standard",
      +    "preserve"
      +  ],
      +  "title": "Save Mode",
      +  "type": "string"
      +}
  2. Changed2 schema fields changedv0.14.0
    • addedInput schema / properties / filepath / description
      Added value: +"Reuse supplied server path; NEVER prepend client cwd. Rooted: relative OK; unrooted stdio: absolute, ask if missing."
    • changedInput schema / properties / snapshot_filepath / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "description": "Reuse supplied server path; NEVER prepend client cwd. Rooted: relative OK; unrooted stdio: absolute, ask if missing.",
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
  3. Addedv0.10.0

TDQS

A4.5/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations only supply destructiveHint=true; the description goes well beyond that, disclosing that preview is a safe dry run, that commit is gated on matching sha256 and token, that snapshots default on and must be a separate file (not an alias or hardlink), that package_fidelity loss blocks commit and is not a full round-trip guarantee, and that save_mode='preserve' patches only literal cell writes with no fallback. That is unusually rich behavioral context for a destructive tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The definition is long but front-loaded with the preview/commit distinction before the operational detail, and nearly every sentence carries a constraint the agent cannot infer. A few items (the long assertion and tool-name enumerations) are dense lists, but they are load-bearing rather than filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 10-parameter destructive transactional tool with no output schema and almost no schema descriptions, the description covers the workflow, gating tokens, snapshot safety rules, save_mode semantics, and failure conditions. The remaining holes are sample_limit and the absence of any hint about what the preview/commit result contains, which matters since no output schema exists.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is only 10% across 10 parameters, yet the description compensates for most of them: it defines the operations entry shape, lists valid assertion names, explains filepath inheritance and which args to omit, and documents save_mode, create_snapshot, snapshot_filepath, changeset_token, and expected_workbook_sha256. The notable gap is sample_limit, which appears nowhere in the description and has no schema description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The first sentence states a specific verb pair (preview/commit), the resource (a group of workbook mutations), and the key abstraction (one transaction), which distinguishes it from the single-operation siblings like write_data_to_excel or format_range. It also enumerates the supported operation and assertion types, so an agent knows exactly what can be batched.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The workflow is spelled out: 'Call preview first. Commit the identical plan with expected_workbook_sha256 and changeset_token from that preview,' plus 'Use the same save_mode in preview and commit.' It gives clear sequencing and constraints but never explicitly contrasts this with using the individual sibling tools for a single edit, so the choice of batching vs. one-off calls is left implicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools