Skip to main content
Glama

merge_table_cells

Destructive

Merge a rectangular range of cells in an existing Google Doc table into one cell, using document ID, table start index, and row/column coordinates. Specify row and column spans to control the merged area.

Instructions

Merge a rectangular range of cells in an existing table into one cell.

Use get_doc_structure to find the table's startIndex and the row/column of the merge range's top-left (anchor) cell. Merging doesn't delete content or shift character indices: cells covered by the merge remain physical entries in the doc, they're just no longer independently addressable in the rendered table.

Args: doc_id: The Google Doc file ID. table_start_index: The startIndex of the table (from get_doc_structure). row_index: Zero-based row of the merge range's top-left cell. column_index: Zero-based column of the merge range's top-left cell. row_span: Number of rows the merged cell should span (default 1). column_span: Number of columns the merged cell should span (default 1).

Returns: Confirmation with docId, table_start_index, row_index, column_index, row_span, and column_span.

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": {
      "doc_id": "<doc_id>",
      "table_start_index": "<table_start_index>",
      "row_index": "<row_index>",
      "column_index": "<column_index>"
    },
    "name": "merge_table_cells"
  }
}

Input Schema

NameRequiredDescriptionDefault
doc_idYes
row_spanNo
row_indexYes
column_spanNo
column_indexYes
table_start_indexYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.9.6

TDQS

A4.5/5.0
Behavior5/5

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

Beyond the destructiveHint annotation, it discloses the non-obvious semantics that matter most here: merging does not delete content or shift character indices, and covered cells remain physical entries that are simply no longer independently addressable. This is exactly the detail an agent needs to predict side effects and to reason about indices in subsequent calls, and the return payload is also described.

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 operation and its key invariant are front-loaded, followed by a hand-off instruction and then compact Args/Returns blocks; every line carries information. The Returns block is mildly redundant given an output schema exists, which keeps it from a 5.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a six-parameter mutation tool with only a destructiveHint annotation, the description covers what it does, the prerequisite lookup, the index model, span defaults, the content-preservation guarantee, and the response shape. Nothing an agent needs to call it correctly is missing.

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 burden, and it does: all six parameters are explained, including that row_index and column_index are zero-based and refer to the top-left anchor, that table_start_index comes from get_doc_structure, and that the span arguments default to 1. This is meaning well beyond the bare 'type: integer' 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 sentence names a specific verb and resource with scope: 'Merge a rectangular range of cells in an existing table into one cell.' An agent immediately knows the operation and that it targets table cells rather than arbitrary text ranges. It stops short of 5 because it never distinguishes itself from the sibling 'merge_cells', leaving the agent to guess which merge tool applies to tables.

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

Usage Guidelines4/5

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

It gives concrete preparation guidance: call get_doc_structure first to obtain the table's startIndex and the anchor cell's row/column. That is clear context for invoking the tool correctly. It offers no exclusions or comparison to alternatives such as unmerge_cells or merge_cells, so it lands at 4 rather than 5.

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