Skip to main content
Glama

set_excel_column_widths

Set column widths for Excel sheets manually or auto-fit to content. Configurable max width and wrap overflow ensure long descriptions fit neatly.

Instructions

Set column widths manually and/or auto-fit them to content.

Auto-fit sizes each column to its longest content (full-width CJK characters count double), capped at max_width. Cells longer than the cap get wrap_text enabled so long descriptions wrap onto multiple lines instead of stretching the column; Excel auto-expands their row heights on open. Columns in widths are set exactly and skipped by auto-fit.

@param file_path: Absolute path to the .xlsx/.xlsm file. @param sheet_name: Target sheet. None = first sheet. @param widths: Explicit widths per column letter, e.g. {"A": 12, "B": 35}. @param auto_fit: Auto-size all other columns in the used range. @param max_width: Width cap for auto-fit in character units (default 60). @param wrap_overflow: Wrap cells longer than max_width (default true). @return: Confirmation listing each column and the width applied.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
widthsNo
auto_fitNo
file_pathYes
max_widthNo
sheet_nameNo
wrap_overflowNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

No annotations provided, but description fully discloses behavioral traits: auto-fit cap, wrap_text for long content, CJK double counting, row height expansion, and return confirmation.

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?

Well-structured with high-level overview first, then parameter documentation. Every sentence adds value without verbosity.

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?

Covers all key aspects despite no annotations: main functionality, parameter semantics, return value (confirmation). Output schema exists, so return format doesn't need elaboration.

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?

Schema coverage is 0%, but description documents each parameter with meaning: file_path absolute, sheet_name target, widths per column letter, auto_fit scope, max_width cap, wrap_overflow behavior.

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?

Clearly states the tool sets column widths manually and/or auto-fits them, using specific verbs and resource. Distinguishes from sibling tools like format_excel_cells.

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?

Explains when to use auto-fit vs explicit widths, and that explicit widths skip auto-fit. Does not explicitly state when not to use or compare to all siblings, but provides solid context.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/VOYAGER-Inc/excel-vision-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server