Skip to main content
Glama
KitchenSink4AI

io.github.nometalalchemist/kitchensink4xl

Set Formula

set_formula
DestructiveIdempotent

Write Excel formulas to a single cell or range, shifting relative references per cell like Excel copy semantics. Normalizes functions to avoid #NAME? errors and flags workbook for recalculation.

Instructions

Write a formula to a single cell, or fill a range where each cell gets the formula with its relative references shifted by that cell's offset (Excel copy semantics; absolute $ anchors stay put). Formulas are normalized so modern functions do not land as #NAME?, and the workbook is flagged to recalculate on its next open; stored cached results stay stale until then (the recalculate tool in the com pack populates them). Auto-backup to .ks4xl-backups; atomic verified save. Refuses while open in Excel.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
sheetNo
backupNo
formulaYes
locationYes
allow_lossNo
verify_comNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.2.0
    • changedOutput schema / (root)
      Previous value: -{
      -  "additionalProperties": true,
      -  "type": "object"
      -}New value: +null
  2. Changed1 schema field changedv1.1.0
    • addedInput schema / properties / location / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "object"
      +  }
      +]
  3. First observedv1.0.0

TDQS

A4.2/5.0
Behavior5/5

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

Annotations only declare readOnlyHint=false and destructiveHint=true; the description adds substantial behavioral detail: relative-reference shifting, absolute anchors, formula normalization, recalc-on-open, stale cached results, auto-backup, atomic verified save, and refusal while open in Excel. This goes well beyond the structured hints.

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

Conciseness5/5

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

The core operation is front-loaded, followed by necessary caveats in compact, information-dense sentences. No filler; every sentence earns its place given the tool's complexity.

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

Completeness3/5

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

The description covers the most important behavioral caveats and safety measures, but it omits parameter-level semantics for ambiguous flags and says nothing about invalid-formula handling or return behavior. Since there is no output schema, those omissions make the tool not fully self-sufficient.

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

Parameters2/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 all 7 parameters. It clarifies formula and location behavior, but leaves allow_loss, verify_com, sheet, and the backup flag semantically unexplained. With multiple ambiguous flags, this is a meaningful gap.

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 starts with a specific verb and resource: writing a formula to a single cell or filling a range, with Excel copy semantics. This clearly distinguishes the tool from value-writing siblings like write_range and set_cell by emphasizing formula-specific behavior.

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 formula-specific wording gives clear context for when to use this tool, and the explicit refusal while the workbook is open in Excel is a useful exclusion. It does not name sibling alternatives or state 'use X for values', but the purpose is clear enough for selection.

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