Skip to main content
Glama

insertTableWithData

Insert a data-filled table at a chosen index in a Google Doc, writing all cells in one operation with an optional bold header row. Ragged rows are padded with empty cells.

Instructions

Inserts a table pre-populated with data at a specific index in the document. All cell content is inserted in a single operation. Optionally bolds the first row as a header. Ragged rows are padded with empty cells to match the widest row.

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": {
      "documentId": "<documentId>",
      "data": "<data>",
      "index": "<index>"
    },
    "name": "insertTableWithData"
  }
}

Input Schema

NameRequiredDescriptionDefault
dataYesA 2D array of strings representing the table contents. Each inner array is one row. Example: [["Name", "Age"], ["Alice", "30"], ["Bob", "25"]]
indexYes1-based character index within the document body where the table should be inserted. Use readDocument with format='index' to inspect indices.
tabIdNoThe ID of the specific tab to insert into. Use listDocumentTabs to get tab IDs. If not specified, inserts into the first tab.
documentIdYesThe document ID — the long string between /d/ and /edit in a Google Docs URL.
readHandleNoCapability returned by a previous readDocument call for this document (and tab). Required over HTTP on the 2026-07-28 runtime: it authorizes the write and pins it to the revision that read saw. Omit it on stdio to use that connection's most recent read.
hasHeaderRowNoIf true, the first row is treated as a header and its text will be bolded.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv4.0.0-rc.1

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It does add real behavioral detail beyond the schema's naming: atomicity ('all cell content is inserted in a single operation'), normalization of ragged input via empty-cell padding, and optional header bolding. It does not disclose what happens to existing content at the insertion index, permission requirements, or failure behavior, which are significant gaps for a document mutation.

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?

Four short sentences with the primary action front-loaded and no filler; each sentence contributes a distinct fact (location, atomicity, header option, padding). Nothing is redundant, though the sentences are slightly list-like rather than prioritized.

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 six-parameter mutation with no annotations and no output schema, the description explains the write's main effects but omits the return value and whether existing document content is shifted by the insertion. The readHandle authorization caveat is left entirely to the schema, so an agent must read the schema to know that HTTP callers need a prior read.

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 coverage is 100%, so every parameter already has its own description, including the readHandle authorization requirement and the 1-based index convention. The description adds only marginal meaning, chiefly the ragged-row padding rule, which is a data-handling detail the schema does not state. Baseline 3 is appropriate.

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 opens with a specific verb and resource ('Inserts a table pre-populated with data') plus the insertion location, which clearly separates it from a bare insertTable or createTable. It never names a sibling explicitly, so the differentiation is implicit rather than stated.

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?

Usage is only implied: the phrases 'pre-populated with data' and 'in a single operation' hint that this is the right tool when content is already known, versus creating an empty table and appending rows. There is no explicit when-to-use or when-not-to-use guidance against siblings like insertTable, createTable, or appendTableRows.

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