Skip to main content
Glama
KitchenSink4AI

io.github.nometalalchemist/kitchensink4xl

Manage Worksheet

manage_worksheet
Destructive

Manage worksheet lifecycle in Excel workbooks: add, delete, rename, copy, reorder, hide, or unhide sheets with auto-backup and safety guards against data loss and reference breakage.

Instructions

Manage the worksheet lifecycle. action is one of: add (new_name, optional index), delete (sheet), rename (sheet, new_name), copy (sheet, optional new_name), reorder (sheet, index as 0-based target), hide (sheet, state 'hidden' or 'very_hidden'), unhide (sheet). The workbook always keeps at least one VISIBLE sheet, so deleting or hiding the last visible one refuses.

Consequence worth knowing: delete does NOT rewrite references, so formulas and defined names that pointed at the deleted sheet break to #REF! when Excel opens the file (Excel's own behavior); rename likewise does not rewrite cross-sheet formula text. Audit references first when in doubt. A hazardous workbook refuses unless allow_loss is true. Auto-backup: prev/anchor slots in .ks4xl-backups (backup=false skips rotation); atomic verified save, restored on failed verify. Refuses while open in Excel.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
indexNo
sheetNo
stateNo
actionYes
backupNo
new_nameNo
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. First observedv1.0.0

TDQS

A4.6/5.0
Behavior5/5

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

Even though destructiveHint is already true, the description adds substantial behavioral detail: delete and rename do not rewrite references and can produce #REF!, the last visible sheet is protected, hazardous workbooks require allow_loss, backups are rotated via .ks4xl-backups, saves are atomic and verified, and the tool refuses while the file is open in Excel. This goes well beyond the annotation.

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 description is dense but every sentence carries unique operational value. The action summary is front-loaded, and the caveats about references, backups, and Excel locking are efficiently grouped. It is long because the tool is complex, not because of waste.

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?

The description covers actions, parameter constraints, side effects, safety refusals, backup behavior, and Excel-lock behavior comprehensively. Minor gaps remain: it does not state return values and leaves verify_com semantically unexplained, so it is not fully complete for an agent invoking every parameter confidently.

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 0% schema description coverage, the description compensates well by defining action-to-parameter mappings, clarifying that index is 0-based, enumerating hide state values, and explaining backup=false and allow_loss. It does not explicitly explain verify_com or path, though path is self-evident.

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 names the resource (worksheet lifecycle) and then enumerates the exact actions available: add, delete, rename, copy, reorder, hide, unhide. This makes it clear what the tool does and distinguishes it from sibling workbook-level tools like create_workbook and copy_workbook.

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 lifecycle framing and action list strongly imply when to use this tool, and the description adds practical conditions such as 'Audit references first when in doubt' and 'Refuses while open in Excel.' It does not explicitly name sibling alternatives or list exclusions, but the intended context is clear.

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