Skip to main content
Glama

resize_columns

Destructive

Set explicit pixel widths for spreadsheet columns or auto-fit them to content by specifying a sheet and column range.

Instructions

Set an explicit pixel width for columns, or auto-fit them to content.

Args: spreadsheet_id: The ID of the spreadsheet (found in the URL) sheet: The name of the sheet start_column: 0-based index of the first column to resize (0 = column A) end_column: 0-based index of the last column to resize (inclusive). If omitted, resizes only start_column. pixel_size: Explicit column width in pixels. Mutually exclusive with auto_resize. auto_resize: If True, auto-fit column width to content instead of setting an explicit pixel_size.

Returns: Result of the batchUpdate operation. Returns {"error": ...} without calling the Sheets API if start_column is negative, end_column precedes start_column, or pixel_size isn't positive.

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": {
      "spreadsheet_id": "<spreadsheet_id>",
      "sheet": "<sheet>",
      "start_column": "<start_column>"
    },
    "name": "resize_columns"
  }
}

Input Schema

NameRequiredDescriptionDefault
sheetYes
end_columnNo
pixel_sizeNo
auto_resizeNo
start_columnYes
spreadsheet_idYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.9.6

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already flag destructiveHint=true, and the description adds real behavioral context beyond that: client-side validation that returns an error dict without calling the Sheets API when indices are invalid or pixel_size isn't positive. It stops short of stating that existing widths are overwritten, which is the actual destructive effect.

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?

Args/Returns structure is front-loaded and easy to scan, with each parameter documented in one or two lines. Minor redundancy: mutual exclusivity is stated in both the pixel_size and auto_resize entries.

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?

An output schema exists, yet the Returns section still earns its place by documenting the error short-circuit condition. Combined with full parameter coverage and the destructive annotation, an agent has what it needs to call this safely, with only the overwrite consequence left implicit.

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%, so the description fully carries the burden and does: it defines the 0-based indexing, the inclusive end_column, the fallback behavior when end_column is omitted, and the mutual exclusivity of pixel_size vs auto_resize. That is meaning beyond the bare types 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?

States a specific verb and resource ('Set an explicit pixel width for columns, or auto-fit them to content') and covers both operating modes up front. An agent can immediately tell this apart from resize_rows, add_columns, and hide_columns.

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 explains the two modes and that pixel_size and auto_resize are mutually exclusive, which implies how to choose between them. It gives no explicit guidance on when to use this vs. sibling tools (e.g., hide_columns or resize_rows), leaving routing to inference from names.

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