Skip to main content
Glama
SheetForge MCP

SheetForge MCP

by iHeldan

apply_table_patch

Destructive

Preview or commit a keyed patch to existing Excel table rows, validating unique keys, read dependencies, and unchanged headers before applying all-or-nothing updates with rollback.

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.
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.

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.2/5.0
Behavior5/5

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

Well beyond the destructiveHint=true annotation, the description discloses that conflicts/missing rows/changed premises block the entire batch, that commit demands an identical patch/base plus token and sha256 from a fresh preview, that ChangeSet snapshots and rollback are reused, and that tokens are not authentication. It even quantifies limits (1000 target cells, 50 spans, 50000 cells/64 columns, sample_limit 1-10), giving the agent a full behavioral profile before invoking a destructive operation.

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?

Purpose and constraints are front-loaded, and nearly every clause carries non-redundant operational detail (validations, blocking rules, commit prerequisites, limits). The middle paragraph is dense and multi-clause, which costs some readability, but it is compact relative to the complexity of an 8-parameter destructive patch tool rather than padded.

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, nested-object tool with no output schema, the description covers invocation requirements, validations, blocking conditions, and limits thoroughly. The notable gap is what the preview returns (the actual shape of the token, examples, or conflict report), which the agent would need to interpret results — but safety and invocation semantics are fully addressed.

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

Parameters5/5

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

Schema coverage is only 25% and the critical `patch` parameter is an opaque free-form object in the schema, yet the description fully specifies its required structure (version=1, source={table_name, sheet_name}, nonempty key_fields, explicit read_fields with [] semantics, updates=[{key, values}]) and the constraint that write fields must not be keys or read_fields. It also clarifies mode behavior, what sample_limit bounds, and the role of rebase_token/expected_workbook_sha256 — compensating almost entirely for the sparse schema.

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

Purpose4/5

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

The first sentence states a specific verb (preview/commit), resource (three-way keyed patch), and target (pinned retained base) in a single well-formed clause. The body enumerates the exact patch shape and operation semantics, making the purpose unmistakable. It stops short of naming a sibling tool it replaces (e.g., apply_workbook_changeset or update_rows_by_key), so differentiation is by capability rather than by explicit routing.

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

Usage Guidelines3/5

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

Usage context is implied through the preview/commit split and the statement that commit requires a fresh preview's rebase_token/expected_workbook_sha256. It also lists blocking conditions (conflicts, missing rows, changed premises). However, there is no explicit 'use this when / use X instead' guidance against the many sibling mutation tools, so the agent must infer the boundary itself.

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