Skip to main content
Glama
KitchenSink4AI

io.github.nometalalchemist/kitchensink4xl

set_formula

Write Excel formulas to a single cell or fill a range with relative references shifted per cell, preventing #NAME? errors and flagging the workbook to recalculate.

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?

With only readOnlyHint=false in annotations, the description carries the full burden and does so richly: formula normalization, #NAME? avoidance, workbook recalculation flagging, stale cached results, auto-backup, atomic verified save, and refusal while open in Excel. No contradiction with annotations.

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 dense but information-packed, with the core purpose front-loaded and each clause adding behavioral context. It is slightly long and run-on in the middle, but no sentence is filler.

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?

For a 7-parameter tool with no schema descriptions and no output schema, this is reasonably complete for the required parameters and safety behavior. However, the semantics of allow_loss and verify_com remain unexplained, leaving real invocation gaps for an agent.

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

Parameters3/5

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

Input schema has 0% description coverage, so the description must compensate. It explains formula semantics and location (cell or range) well, and backup behavior is mentioned, but optional parameters such as allow_loss and verify_com are never given meaning.

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: writing a formula to a single cell or filling a range. It also defines the distinctive Excel copy semantics (relative references shift, absolute anchors stay), which clearly separates it from generic value-writing siblings like set_cell 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?

It clearly identifies the intended use case: any operation that writes formulas to cells/ranges. It adds contextual constraints (refuses while open in Excel, recalculate behavior via a companion tool), though it does not explicitly name sibling alternatives or state 'use set_cell for static values'.

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