Skip to main content
Glama

Autofit Columns

autofit_columns

Adjust column widths to fit content in an open Excel workbook, for a specified range or the entire used range.

Instructions

Autofit column widths for a range, or the sheet's used range if none given.

Args: workbook: Workbook name or path (None = active workbook). sheet: Worksheet name (None = active sheet). range_address: A1-style address (None = the sheet's used range).

Returns: JSON confirmation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sheetNo
workbookNo
range_addressNo
Behavior3/5

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

With no read-only or destructive annotations, the description carries the behavioral burden. It does disclose the core behavior: column widths are changed based on the provided range or used range, and a JSON confirmation is returned. It does not mention side effects, reversibility, or permission needs, but the mutation is clearly inferred from 'Autofit column widths'.

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 compact and front-loaded with the primary purpose before the argument details. Each line in the Args and Returns sections earns its place, and there is no redundant or filler text. It is appropriately sized for a simple three-parameter tool.

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 adequately covers the tool's operation, all optional parameters, the default behaviors for each, and the return type. It does not specify the exact structure of the JSON confirmation or address error cases, but for a simple formatting action this is a minor gap. Overall, an agent has enough context to call the tool correctly.

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 description coverage is 0%, so the description must fully document the parameters. It does this well by explaining that workbook accepts a name or path, sheet is a worksheet name, and range_address is A1-style, with None defaults for each. This adds real meaning beyond the raw parameter names and defaults in the schema.

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 uses a specific verb-resource pair, 'Autofit column widths', and clearly defines the scope: a given range or the sheet's used range. This distinguishes the tool from formatting and range-editing siblings. The meaning is unambiguous and actionable.

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

Usage Guidelines3/5

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

The description implies the tool is used when column widths need to be autofitted, and clarifies range behavior with defaults. However, it does not explicitly state when to choose this over alternatives like format_range, nor does it mention exclusions or prerequisites. Usage context is implied rather than stated.

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/trustypangolin/excel-mcp-live'

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