Skip to main content
Glama

insert_table_row

Destructive

Inserts a row into an existing Google Docs table above or below a specified row, using the table start index and row index.

Instructions

Insert a row into an existing table in a Google Doc.

Use get_doc_structure to find the table's startIndex and the row_index to insert relative to.

Args: doc_id: The Google Doc file ID. table_start_index: The startIndex of the table (from get_doc_structure). row_index: The row to insert relative to. insert_below: If True (default), insert below the specified row. If False, insert above it.

Returns: Confirmation with docId, table_start_index, and the row_index used.

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

Input Schema

NameRequiredDescriptionDefault
doc_idYes
row_indexYes
insert_belowNo
table_start_indexYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.9.6

TDQS

A3.8/5.0
Behavior3/5

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

The annotations already flag destructiveHint=true, so the mutation risk is covered. The description adds useful context by documenting the get_doc_structure dependency, but it doesn't disclose the practical consequences of insertion, such as existing rows shifting and previously computed indices becoming stale, which matters for a positional-index tool. The Returns section largely restates what the output schema already provides.

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 description is short and front-loads the operation before the Args block, and every parameter line earns its place. The Returns section is redundant given that an output schema exists, which is the only real waste.

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 four-parameter mutation tool, the description covers purpose, prerequisite lookup, and parameter meaning, and the output schema handles the return value. The main omission is the effect on surrounding rows and index validity, which an agent would need to know when chaining calls.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description carries the full burden and mostly meets it: it explains that table_start_index comes from get_doc_structure, defines row_index as the row to insert relative to, and spells out insert_below's semantics and default. The only gap is that it doesn't state the indexing convention (0-based vs 1-based) for row_index.

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 description gives a specific verb and resource ('Insert a row into an existing table in a Google Doc'), which lets an agent distinguish it from siblings such as insert_doc_table or delete_table_row by implication. It doesn't explicitly name those alternatives, but the scope (a single row in an already existing table) is unambiguous.

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 clearly states the prerequisite workflow: call get_doc_structure first to obtain the table's startIndex and the row index to insert relative to. It stops short of saying when not to use it (for example, when the table doesn't yet exist, use insert_doc_table), but the guidance is otherwise actionable and specific.

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