Skip to main content
Glama

Insert a table

insert_table

Insert a table with your chosen number of rows and columns into a Google Doc. Use a 2D array to fill cell text, set alignment and header shading, and choose the position.

Instructions

Insert a rows×columns table, optionally populated from a 2D array of cell text — cell text may use inline markdown (bold, italic, code, links). Per-column alignment via align. Position via at (top/end/or a unique text anchor, default end). A direct edit, not a tracked suggestion.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
atNo"top", "end", or a unique text snippet to insert after (default end)
tabNoTarget a specific tab by tabId or title (from list_tabs). Defaults to the first tab.
dataNorow-major cell text, e.g. [["A","B"],["1","2"]]
pageNowhich header/footer, when a doc defines more than one (default-page, first-page, even-page). Omit to use whichever exists.
rowsYes
alignNoper-column text alignment, e.g. ["left","right"]; null or "left" leaves a column at the default
accountNoGoogle account email to use. Defaults to GDOCS_DEFAULT_ACCOUNT, or the sole account.
columnsYes
segmentNowhich content tree to target: body (default), or the page header/footer. Header/footer content is invisible to a body read — a letterhead logo lives there.
documentIdYes
headerShadeNohex background color for the first row, e.g. #f1f3f4
columnWidthsNofixed width per column, in points
createSegmentNowhen segment is header/footer and the doc has none, create it first. Only the default header/footer can be created via the API.
Behavior4/5

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

With no annotations, the description carries the burden. It discloses the key behavior 'A direct edit, not a tracked suggestion' and explains markdown processing. It stops short of detailing error scenarios or permission requirements, but covers the most critical behavioral trait.

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 description is three sentences, front-loaded with the core purpose, followed by essential parameter details and a closing behavioral note. Every sentence earns its place without redundancy or fluff.

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 13-parameter tool with no output schema, the description covers the fundamental use case and required parameters (rows, columns, documentId implied). It also explains optional data/alignment/position. Advanced options like segment, tab, and account are left to the schema, which is acceptable given the schema's high coverage.

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?

Schema coverage is 77%, so a baseline of 3 applies. The description adds value beyond the schema by clarifying rows/columns as dimensions, noting optional population from a 2D array, and specifying 'at' semantics (top/end/anchor). This complements and enriches the schema definitions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Insert a rows×columns table' with a specific verb and resource. It also distinguishes from siblings by noting 'A direct edit, not a tracked suggestion,' which separates it from suggestion-related tools.

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 provides practical usage context: how to specify position ('via at (top/end/or a unique text anchor, default end)'), data format ('2D array of cell text'), and markdown support. It also gives a when-not via 'not a tracked suggestion,' but does not explicitly name alternative tools.

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/dasasian/gdocs-mcp'

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