Skip to main content
Glama

autofit_range

Adjusts column widths and row heights of a specified range so cell content fits properly.

Instructions

Autofit column widths and/or row heights of a range to their content.

Input Schema

NameRequiredDescriptionDefault
rowsNoAutofit row heights. Default true.
rangeYesA1 range address, e.g. "A:F".
columnsNoAutofit column widths. Default true.
sheetNameNoWorksheet name. Defaults to the active worksheet.
workbookIdNoTarget workbook ID from list_workbooks. Optional when only one workbook is connected.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.0

TDQS

B3.3/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 disclosure burden, and it says nothing about whether the autofit persists to the saved file, whether a save step is needed, what permissions or open-workbook state are required, or what the response looks like. The 'and/or' phrasing does convey that rows/columns can be targeted independently, but the mutation's side effects go undisclosed.

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?

One sentence, front-loaded with the verb and resource, with the scope qualifier at the end. There is no filler or redundancy; every clause carries information.

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?

For a five-parameter formatting tool with no annotations and no output schema, the description covers purpose adequately and the schema covers parameters fully, but it omits the behavioral context an agent needs (persistence, save requirement) and does not differentiate from set_dimensions. It is adequate but has clear gaps.

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 description coverage is 100%, so every parameter including rows, columns, sheetName, and workbookId is already documented in the schema. The description's 'and/or' hints at the rows/columns toggle but adds no syntax, default, or format detail beyond what the schema states, so the baseline 3 applies.

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 description names a specific operation (autofit) applied to specific resources (column widths and/or row heights) over a range, with the 'to their content' clause clarifying the semantic effect. It is clearly distinct from write-oriented siblings like write_range or format_range, though it never explicitly contrasts itself with set_dimensions, which is the nearest neighbor.

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?

Usage is only implied: an agent can infer this is the tool for content-driven sizing, but the description never states when to prefer it over set_dimensions (explicit sizing) or format_range. No prerequisites, no exclusions, no named alternatives.

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