Skip to main content
Glama
SheetForge MCP

SheetForge MCP

by iHeldan

apply_table_patch

Destructive

Preview and commit keyed table updates to existing Excel rows against a pinned base, blocking conflicts, missing rows, or changed premises before writing.

Instructions

Preview/commit a three-way keyed patch against a pinned retained base.

patch requires version=1, source={table_name, optional sheet_name}, nonempty
key_fields, explicit read_fields (use [] only for no extra dependencies), and
updates=[{key: {all key fields}, values: {literal field updates}}]. Write fields
must not be keys/read_fields. Checks complete unique keys and row-local read
dependencies; does not infer undeclared or cross-row dependencies. Existing
rows only, same exact headers with reordering allowed, no formula evaluation.
Numeric keys/read/target values use exact typed equality, never rounded decimal
spelling: int10**23 differs from float1e23, but numeric1 equals1.0.
Conflicts/missing rows/changed premises block the entire batch. Commit requires
the identical patch/base and rebase_token/expected_workbook_sha256 from a fresh
preview. Reuses ChangeSet snapshots, exact-file checks and rollback. Limits:
1000 target cells, 50 contiguous column spans, 50000 table cells/64 columns per
source; sample_limit 1-10 bounds examples only. Tokens are not authentication.

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": {
      "base_filepath": "<base_filepath>",
      "filepath": "<filepath>",
      "patch": "<patch>",
      "expected_base_sha256": "<expected_base_sha256>"
    },
    "name": "apply_table_patch"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNopreview
patchYes
filepathYesReuse supplied server path; NEVER prepend client cwd. Rooted: relative OK; unrooted stdio: absolute, ask if missing.
rebase_tokenNo
sample_limitNo
base_filepathYesReuse supplied server path; NEVER prepend client cwd. Rooted: relative OK; unrooted stdio: absolute, ask if missing.
expected_base_sha256Yes
expected_workbook_sha256No

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.14.0

TDQS

A4.5/5.0
Behavior5/5

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

Beyond destructiveHint=true, the description discloses substantial behavioral context: conflicts/missing rows/changed premises block the entire batch, commit requires a fresh preview and identical patch/base, writes reuse ChangeSet snapshots and rollback, and formula evaluation is not performed. It also documents limits and token semantics, giving an agent a strong operational picture.

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 dense but front-loaded and largely free of filler. Every clause conveys constraints or behavior, though the density and compact notation make some sections harder to scan than ideal.

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 complex destructive mutation with eight parameters, nested patch input, no output schema, and only one annotation, the description covers most critical behavior, prerequisites, and limits. It is only slightly incomplete because it does not describe preview return values or fully explain every parameter.

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?

With only 25% schema description coverage, the description compensates by explaining the patch object shape in detail, including version, source, key_fields, read_fields, updates, and write-field restrictions. It also explains numeric equality and the roles of rebase_token and sample_limit, though it does not fully clarify mode or expected_base_sha256 semantics.

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 description opens with a specific verb and resource: 'Preview/commit a three-way keyed patch against a pinned retained base.' It clearly establishes the operation as a keyed table mutation against a retained base, which distinguishes it from generic workbook changeset or row-append siblings.

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?

It states preview/commit flow, commit prerequisites, and important scope limits such as existing rows only and exact headers. It does not explicitly name when to choose this over sibling tools like apply_workbook_changeset or upsert_excel_table_rows, but the constraints give clear usage context.

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