Skip to main content
Glama

setColumnWidths

Sets the width in pixels for one or more spreadsheet columns or ranges in a single call, and supports hiding a column by setting its width to 0.

Instructions

Sets the width (in pixels) of one or more columns in a spreadsheet. Accepts multiple column specs in a single call, each targeting a single column or a contiguous range (e.g., "A", "B:D").

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "spreadsheetId": "<spreadsheetId>",
      "columnWidths": "<columnWidths>"
    },
    "name": "setColumnWidths"
  }
}

Input Schema

NameRequiredDescriptionDefault
sheetNameNoName of the sheet/tab. Defaults to the first sheet if not provided.
columnWidthsYesList of column width specifications to apply.
spreadsheetIdYesThe spreadsheet ID — the long string between /d/ and /edit in a Google Sheets URL.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv4.0.0-rc.1

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 behavioral burden. It implies a mutation of sheet layout but says nothing about whether existing widths of unspecified columns are preserved, whether the change is reversible, permission requirements, or what a partially invalid column range does.

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?

Two front-loaded sentences with the core action first and the accepted input shape second; no filler. Slight redundancy because the "B:D" example already appears in the schema.

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?

For a simple three-parameter layout tool with a fully documented schema and no output schema, the definition covers what the tool does and how to express targets. The remaining gap is mutation behavior and how conflicts or invalid ranges are handled.

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%, including A1-notation examples and the meaning of width 0 (hide). The description's range example ("A", "B:D") restates what the schema already documents, adding no new semantics beyond the batching note.

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?

States a specific verb and resource ("Sets the width ... of one or more columns in a spreadsheet") and clarifies scale (one or many columns). It does not distinguish itself from the sibling autoResizeColumns, which an agent may well consider for the same goal.

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?

Implies a usage pattern by noting that multiple column specs can be applied in a single call, which nudges toward batching rather than repeated calls. It gives no explicit when-to-use versus autoResizeColumns or other column-formatting siblings, and no prerequisites.

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

Deploy Server

Other Tools