Skip to main content
Glama

autofit_columns

Adjust Excel column widths based on the longest text in each column, using optional min/max limits and padding to prevent cramped cells.

Instructions

Automatically adjust column widths based on maximum text length.

Args: path: Path to the .xlsx file, or the name of a preloaded file. Omit if only one file is configured. sheet: Sheet name. min_width: Minimum allowed column width. max_width: Maximum allowed column width. padding: Extra padding characters to add to max length.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNo
sheetYes
backupNo
paddingNo
max_widthNo
min_widthNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.3.0

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It implies a file mutation but never states whether changes persist, whether a backup is created, or what happens to the existing widths. The 'backup' parameter exists in the schema yet is entirely absent from the description, leaving a significant behavioral gap.

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 summary line is front-loaded and the docstring-style Args block is compact and easy to scan. No filler sentences, though the parameter listing is a bit terse and the base-width unit (characters) is left implicit.

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?

Since an output schema exists, return values need not be explained. But for a mutating tool with no annotations, the missing 'backup' semantics and lack of any persistence/safety disclosure leave an agent partially under-informed about side effects.

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?

Schema coverage is 0%, so the description must compensate. It explains five of six parameters meaningfully (path, sheet, min_width, max_width, padding), adding semantics like 'extra padding characters to add to max length.' However, it omits 'backup' entirely, leaving one parameter undocumented in both schema and description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening sentence states a specific verb (adjust) and resource (column widths) with the mechanism (based on maximum text length). This clearly distinguishes it from structural siblings like insert_columns/delete_columns and styling tools like set_cell_style. No explicit sibling routing, but the purpose is unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no guidance on when to use this tool versus alternatives, nor any prerequisite or exclusion. The only conditional note is a parameter-level hint ('Omit if only one file is configured') tucked into the Args list rather than usage guidance.

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