Skip to main content
Glama

groupRows

Creates collapsible row groups in a Google Sheet so you can organize, hide, and expand related rows by specifying 1-based start and end row ranges.

Instructions

Creates collapsible row groups in a Google Sheet using the Sheets API addDimensionGroup request. Each group specifies a range of rows (1-based, inclusive) to collapse.

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>",
      "groups": "<groups>"
    },
    "name": "groupRows"
  }
}

Input Schema

NameRequiredDescriptionDefault
groupsYesArray of row ranges to group. Each entry is {startRowIndex, endRowIndex} using 1-based row numbers.
sheetNameNoName of the sheet/tab. Defaults to the first sheet if not provided.
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.2/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full behavioral burden. It usefully discloses the underlying API request and the collapse state applied, but omits what happens to ranges that overlap existing groups, whether the operation is idempotent, permission requirements, and what the call returns.

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 concise sentences, front-loaded with the core action and then the range semantics. No filler or repetition, though the second sentence largely duplicates schema content.

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 structural mutation tool with no annotations and no output schema, the definition covers the essentials but leaves gaps around return values, error behavior for invalid or overlapping ranges, and interaction with existing groups. Adequate as a minimum-viable definition, not complete.

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 the parameters are already documented, and the description only restates the 1-based inclusive range semantics already present in the schema. It adds no format, default, or constraint information beyond the structured data, matching the baseline for full schema coverage.

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 ('Creates collapsible row groups in a Google Sheet') and names the underlying API request (addDimensionGroup), which distinguishes it from the sibling ungroupAllRows by implying the inverse direction. It does not explicitly name the sibling alternative, so it stops short of a 5.

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

Usage Guidelines2/5

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

There is no explicit statement of when to use this tool versus ungroupAllRows or other structural tools, and no prerequisites (e.g., sheet must exist, ranges must be valid). The only guidance is implicit in the single sentence describing what each group range means to collapse.

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