Skip to main content
Glama
KitchenSink4AI

io.github.nometalalchemist/kitchensink4xl

manage_worksheet

Add, delete, rename, copy, reorder, hide, or unhide worksheets with automatic backup and verified saving, preserving the last visible sheet and refusing changes that would leave the workbook unusable.

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.5/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 burden and exceeds it. It discloses that delete and rename do not rewrite references (leading to #REF!), describes the auto-backup rotation and atomic verified save, the one-visible-sheet invariant, the allow_loss hazardous-workbook gate, and the 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 front-loaded with the action-to-parameter mapping, then adds high-value safety and backup caveats. Every sentence carries information, though the single-paragraph format and length could have been slightly improved with clearer separation of the action list and behavioral cautions.

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 9-parameter, multi-action mutation tool with no output schema and almost no annotation support, the description is impressively complete: it covers allowed actions, per-action parameters, refusal conditions, reference-breaking consequences, backup behavior, and loss protection. The only noticeable gap is the undefined verify_com parameter, and return values are not mentioned.

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%, but the description maps actions to their relevant parameters (e.g., add uses new_name and optional index; delete uses sheet; reorder uses sheet and a 0-based index). It also explains backup=false skips rotation and allow_loss gates hazardous workbooks. However, verify_com is not explained, and path is only implicit.

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 clear resource and function ('Manage the worksheet lifecycle') and immediately enumerates the specific actions: add, delete, rename, copy, reorder, hide, unhide. This makes it distinctly about worksheets rather than workbook-level tools like create_workbook or 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 description gives clear operational context: deleting/hiding the last visible sheet refuses, hazardous workbooks require allow_loss=true, and the tool refuses while the workbook is open in Excel. It also advises auditing references first. It does not explicitly name alternative sibling tools or state when-not-to-use, so it misses a full 5.

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