Skip to main content
Glama
KitchenSink4AI

io.github.nometalalchemist/kitchensink4xl

set_dimensions

Adjust Excel worksheet dimensions by setting column widths, row heights, hiding rows or columns, grouping rows or columns into collapsible outlines, and autofitting columns to content.

Instructions

Set column widths and row heights, hide rows or columns, group them into collapsible outline levels, and service an autofit request. column_widths maps column letters or indices to widths in Excel character units; row_heights maps row numbers to heights in points; autofit_columns sizes columns to content as a best-effort APPROXIMATION (true autofit needs Excel via the com pack).

Grouping is Excel's outline: group_rows and group_columns take spans of {start, end, level 1-7, collapsed}, the collapse bracket a budget or financial model is built around; ungroup_rows and ungroup_columns clear a span's level and unhide it; outline_summary {below, right} says which side the total sits on. Read the current outline back from get_workbook_metadata, which reports it per sheet when a sheet has one. A hazardous workbook refuses unless allow_loss is true. Auto-backup to .ks4xl-backups; atomic verified save. Refuses while open in Excel.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
sheetNo
backupNo
hide_rowsNo1-based row numbers.
allow_lossNo
group_rowsNoOutline spans, {start, end, level 1-7, collapsed}. Rows take numbers, columns take letters or numbers.
verify_comNo
row_heightsNo
hide_columnsNoColumn letters, e.g. ['A', 'C'].
ungroup_rowsNoOutline spans, {start, end, level 1-7, collapsed}. Rows take numbers, columns take letters or numbers.
column_widthsNo
group_columnsNoOutline spans, {start, end, level 1-7, collapsed}. Rows take numbers, columns take letters or numbers.
autofit_columnsNoColumn letters, e.g. ['A', 'C'].
outline_summaryNo
ungroup_columnsNoOutline spans, {start, end, level 1-7, collapsed}. Rows take numbers, columns take letters or numbers.

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. Changed11 schema fields changedv1.1.0
    • changedInput schema / properties / autofit_columns / anyOf
      Previous value: -[
      -  {
      -    "items": {},
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "items": {
      +      "type": "string"
      +    },
      +    "type": "array"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / autofit_columns / description
      Added value: +"Column letters, e.g. ['A', 'C']."
    • addedInput schema / properties / group_columns
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "properties": {
      +          "collapsed": {
      +            "type": "boolean"
      +          },
      +          "end": {
      +            "anyOf": [
      +              {
      +                "type": "string"
      +              },
      +              {
      +                "type": "integer"
      +              }
      +            ]
      +          },
      +          "level": {
      +            "maximum": 7,
      +            "minimum": 1,
      +            "type": "integer"
      +          },
      +          "start": {
      +            "anyOf": [
      +              {
      +                "type": "string"
      +              },
      +              {
      +                "type": "integer"
      +              }
      +            ]
      +          }
      +        },
      +        "required": [
      +          "start"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Outline spans, {start, end, level 1-7, collapsed}. Rows take numbers, columns take letters or numbers."
      +}
    • addedInput schema / properties / group_rows
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "properties": {
      +          "collapsed": {
      +            "type": "boolean"
      +          },
      +          "end": {
      +            "anyOf": [
      +              {
      +                "type": "string"
      +              },
      +              {
      +                "type": "integer"
      +              }
      +            ]
      +          },
      +          "level": {
      +            "maximum": 7,
      +            "minimum": 1,
      +            "type": "integer"
      +          },
      +          "start": {
      +            "anyOf": [
      +              {
      +                "type": "string"
      +              },
      +              {
      +                "type": "integer"
      +              }
      +            ]
      +          }
      +        },
      +        "required": [
      +          "start"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Outline spans, {start, end, level 1-7, collapsed}. Rows take numbers, columns take letters or numbers."
      +}
    • changedInput schema / properties / hide_columns / anyOf
      Previous value: -[
      -  {
      -    "items": {},
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "items": {
      +      "type": "string"
      +    },
      +    "type": "array"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / hide_columns / description
      Added value: +"Column letters, e.g. ['A', 'C']."
    • changedInput schema / properties / hide_rows / anyOf
      Previous value: -[
      -  {
      -    "items": {},
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "items": {
      +      "minimum": 1,
      +      "type": "integer"
      +    },
      +    "type": "array"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / hide_rows / description
      Added value: +"1-based row numbers."
    • addedInput schema / properties / outline_summary
      Added value: +{
      +  "anyOf": [
      +    {
      +      "additionalProperties": true,
      +      "type": "object"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null
      +}
    • addedInput schema / properties / ungroup_columns
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "properties": {
      +          "collapsed": {
      +            "type": "boolean"
      +          },
      +          "end": {
      +            "anyOf": [
      +              {
      +                "type": "string"
      +              },
      +              {
      +                "type": "integer"
      +              }
      +            ]
      +          },
      +          "level": {
      +            "maximum": 7,
      +            "minimum": 1,
      +            "type": "integer"
      +          },
      +          "start": {
      +            "anyOf": [
      +              {
      +                "type": "string"
      +              },
      +              {
      +                "type": "integer"
      +              }
      +            ]
      +          }
      +        },
      +        "required": [
      +          "start"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Outline spans, {start, end, level 1-7, collapsed}. Rows take numbers, columns take letters or numbers."
      +}
    • addedInput schema / properties / ungroup_rows
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "properties": {
      +          "collapsed": {
      +            "type": "boolean"
      +          },
      +          "end": {
      +            "anyOf": [
      +              {
      +                "type": "string"
      +              },
      +              {
      +                "type": "integer"
      +              }
      +            ]
      +          },
      +          "level": {
      +            "maximum": 7,
      +            "minimum": 1,
      +            "type": "integer"
      +          },
      +          "start": {
      +            "anyOf": [
      +              {
      +                "type": "string"
      +              },
      +              {
      +                "type": "integer"
      +              }
      +            ]
      +          }
      +        },
      +        "required": [
      +          "start"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Outline spans, {start, end, level 1-7, collapsed}. Rows take numbers, columns take letters or numbers."
      +}
  3. First observedv1.0.0

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the readOnlyHint=false annotation, the description discloses significant behavioral traits: autofit_columns is a best-effort approximation and true autofit requires Excel via the COM pack, hazardous workbooks refuse unless allow_loss is true, auto-backup to .ks4xl-backups occurs, saves are atomic and verified, and the tool refuses while the workbook is open in Excel. This is exactly the kind of value that annotations alone do not provide.

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 well organized: the main operation is front-loaded, then parameter units and grouping semantics are explained, and finally safety/backup behavior is stated. Every sentence adds operational detail; there is no filler or redundancy.

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

Completeness5/5

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

For a complex 15-parameter mutation tool with no output schema, the description covers the essential operational context: parameter semantics, grouping behavior, autofit limitations, safety safeguards, backup behavior, and Excel lock refusal. It also names get_workbook_metadata as the companion for reading outline state, which closes the main contextual loop an agent needs.

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

Parameters5/5

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

With only 47% schema description coverage, the description compensates well: column_widths are in Excel character units, row_heights are in points, grouping spans are {start, end, level 1-7, collapsed}, outline_summary determines which side the total sits on, and ungroup clears a span's level and unhides it. These details map directly to the schema parameters and add meaning that the bare schema does not convey.

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 scope: 'Set column widths and row heights, hide rows or columns, group them into collapsible outline levels, and service an autofit request.' It clearly identifies the tool's domain as workbook layout/dimensions, which distinguishes it from sibling tools focused on cell values or content formatting.

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 provides clear context for when this tool applies, including sizing, hiding, grouping, outline summary, and autofit. It explicitly points to get_workbook_metadata for reading the current outline, which helps an agent know where to fetch related state. It does not enumerate negative cases or direct the agent to alternative tools for content formatting, but the usage context is strong.

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