Skip to main content
Glama
nometalalchemist

io.github.nometalalchemist/kitchensink4xl

apply_edits

Apply a batch of spreadsheet edits atomically: validates every change before writing, saves once, and restores from backup if verification fails.

Instructions

Apply many addressed edits as ONE atomic batch. edits is a list of {op, location, ...}: set_value {value}, set_formula {formula}, clear {what: contents|formats|all}, write_range {data: 2D array}. location is any location object, including a stale-checked get_grid_view anchor.

Every location is resolved and every op validated BEFORE anything is written, so a single bad edit refuses the whole batch and the file stays byte-for-byte unchanged. The batch then takes ONE backup (prev/anchor slots in .ks4xl-backups), does ONE atomic save, and runs ONE verify-after-write, which restores from the backup if the produced file fails to read back as intended. Formula edits are normalized and flag recalculation; each write_range op honors the 200,000-cell ceiling. A hazardous workbook refuses unless allow_loss is true; refuses while the file is open in Excel. Returns the count of edits applied and cells touched.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
editsYes
backupNo
allow_lossNo
verify_comNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv1.0.0

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure, and it delivers: it discloses all-or-nothing failure semantics, the byte-for-byte unchanged guarantee, backup slot behavior, verify-after-write restoring from backup, formula recalculation flags, the 200,000-cell ceiling per write_range, refuse conditions (hazardous workbook, open in Excel), and the return values (counts of edits and cells touched).

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 description is information-dense but tightly packed—every sentence covers a distinct behavioral trait (validate-before-write, backup, verify-after-write, formula normalization, limits, refuse conditions). It front-loads the core purpose and op shapes before diving into atomicity details. It is longer than a typical tool description, but the density justifies the length; a small amount of trimming or structural breakdown (e.g., bullet separators for each op) could improve scannability.

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?

Given 5 parameters, no annotations, no per-parameter schema descriptions, and an output schema hint, the description covers the most complex behaviors and return expectations. Gaps remain: it doesn't explicitly explain what 'verify_com' controls, whether the backup parameter can be disabled, or the exact output schema fields; because the tool is a complex mutation, the description could be complete only with a bit more detail on those structured fields.

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 description coverage is 0%, so the description must compensate for the sparse schema. It explains the structure of 'edits' with concrete op examples and payload shapes (set_value {value}, set_formula {formula}, clear {what}, write_range {data: 2D array}), and it explains the behavior of allow_loss, backup, and verify-related conditions implicitly. It doesn't explicitly define every parameter (path, verify_com), but it adds substantial meaning to the most complex one.

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 precise verb phrase—'Apply many addressed edits as ONE atomic batch'—and then enumerates the exact op shapes (set_value, set_formula, clear, write_range) with their payloads. This makes the tool's resource and action unmistakable, and the atomic-batch qualifier differentiates it from single-edit siblings like set_cell, set_cells, and write_range.

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 description implies the tool is for batching multiple edits atomically and contrasts with the hazardous-workbook/open-in-Excel preconditions, which is useful context. However, it never explicitly names an alternative like set_cells or write_range or says 'use this when you need atomicity, use set_cells for one-off writes,' so the when-to-use guidance is strong but not fully explicit.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/nometalalchemist/KitchenSink4XL'

If you have feedback or need assistance with the MCP directory API, please join our Discord server