Skip to main content
Glama

Insert a table

insert_table

Add an empty table to a Google Doc at a chosen position, or append it to the end when no position is given. Specify the number of rows and columns, then fill the cells with text.

Instructions

Inserts an empty rows x columns table at an index, or at the end of the body when index is omitted. Fill the cells afterwards: read_document_text shows the new table's range and per-cell layout, then insert_text into each cell (cell content ranges are visible in get_document; each cell holds its own paragraphs). Cell merging, cell background/borders and pinned header rows are not covered by typed tools — use raw_request with mergeTableCells/updateTableCellStyle/pinTableHeaderRows.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rowsYesNumber of rows.
indexNoInsertion index (from read_document_text). Omit to append at the end.
tab_idNoTab to target (from list_tabs). Omit for the first/only tab.
columnsYesNumber of columns (the API caps width).
segment_idNoHeader/footer/footnote segment id (from get_document). Omit for the document body.
document_idYesThe document id — the long id from the document URL (docs.google.com/document/d/<documentId>/edit) or from create_document output.
Behavior4/5

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

Annotations already provide readOnlyHint=false and idempotentHint=false, so the mutating behavior is known. The description adds useful context: the table is created empty, each cell holds its own paragraphs, and advanced styling requires raw_request. It does not disclose index-shifting effects on following content, but the insertion semantics and remaining annotations cover the main behavioral expectations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The main action is front-loaded in the first sentence, followed by a compact workflow sentence and a precise sentence listing unsupported operations and the raw_request escape hatch. Every sentence serves a purpose, and the length is appropriate for the tool's complexity.

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 mutation tool with six parameters and no output schema, the description covers the core behavior, the expected follow-up steps, and the boundary between typed tools and raw_request. The main weakness is the imprecise 'end of the body' wording given the existence of segment_id, and the absence of any mention of what the tool returns or whether existing indexes shift.

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 descriptions cover 100% of the six parameters, so the baseline is 3. The description adds workflow context but does not materially enrich parameter semantics beyond the schema; for example, index origin and segment_id behavior are already documented in the input schema. There is no additional format, default, or constraint information in the description that is not already present.

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 clearly states the core operation: inserting an empty table with a given number of rows and columns at an index or appended at the end. It is distinguishable from siblings by the word 'inserts' and 'empty table', but the phrase 'end of the body' is slightly imprecise because segment_id can target header/footer/footnote segments, not just the document body. It also does not explicitly contrast with edit_table, though the semantics are clear.

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

Usage Guidelines5/5

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

The description gives a concrete follow-up workflow: use read_document_text to find the new table's range, then insert_text into each cell. It explicitly names the alternative for unsupported features (raw_request with mergeTableCells/updateTableCellStyle/pinTableHeaderRows), giving the agent clear when-to-use and when-not-to-use guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/A1-x-Tech/mcp-google-docs'

If you have feedback or need assistance with the MCP directory API, please join our Discord server