Skip to main content
Glama

merge_cells

Destructive

Combine a specified cell range in a Google Sheets spreadsheet into one cell, or merge rows or columns independently, to organize headers and grouped data.

Instructions

Merge a range of cells into one cell.

Args: spreadsheet_id: The ID of the spreadsheet sheet: The name of the sheet range: A1 notation range to merge (e.g. "A1:C3") merge_type: "MERGE_ALL" (default), "MERGE_COLUMNS" (merge each column independently), or "MERGE_ROWS" (merge each row independently)

Returns: Result of the batchUpdate operation

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>",
      "range": "<range>"
    },
    "name": "merge_cells"
  }
}

Input Schema

NameRequiredDescriptionDefault
rangeYes
sheetYes
merge_typeNoMERGE_ALL
spreadsheet_idYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.9.6

TDQS

B3.3/5.0
Behavior2/5

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

Annotations already declare destructiveHint=true, so the safety profile is known, but the description adds no behavioral context of its own. Critically, it never states that only the anchor cell's value is preserved and the other cells' contents are lost on merge, which is the key risk an agent needs before calling a destructive tool.

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?

The summary sentence is front-loaded and the Args/Returns sections are scannable and free of filler. It is slightly formal/long for four parameters but every line conveys 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?

An output schema exists, so the terse Returns line is acceptable, and all parameters are documented. However, for a destructive spreadsheet mutation the definition omits what data is destroyed and how conflicts with existing merged ranges are handled, leaving a meaningful gap.

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 carries the full load and does so well: it explains all four parameters, gives an A1-notation example ("A1:C3"), and defines the merge_type values — including the default MERGE_ALL and the per-column/per-row semantics — none of which appear in the schema.

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 first line states a specific verb and resource ("Merge a range of cells into one cell"), which is unambiguous on its own. It does not, however, distinguish itself from siblings such as merge_table_cells or unmerge_cells, so an agent must infer the boundary from the names alone.

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 when-to-use or when-not-to-use guidance, no mention of prerequisites (e.g. that the range must contain more than one cell or must not already be merged), and no routing to unmerge_cells or merge_table_cells as alternatives. Only the presence of a range argument implies context.

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