Skip to main content
Glama

Create Table with Data

create_table_with_data

Create a table populated with data in a Google Doc by providing a 2D list of strings, inserting it at the correct index with optional bold or repeating headers.

Instructions

Creates a table and populates it with data in one reliable operation.

CRITICAL: YOU MUST CALL inspect_doc_structure FIRST TO GET THE INDEX!

MANDATORY WORKFLOW - DO THESE STEPS IN ORDER:

Step 1: ALWAYS call inspect_doc_structure first Step 2: Use the 'total_length' value from inspect_doc_structure as your index Step 3: Format data as 2D list: [["col1", "col2"], ["row1col1", "row1col2"]] Step 4: Call this function with the correct index and data

EXAMPLE DATA FORMAT: table_data = [ ["Header1", "Header2", "Header3"], # Row 0 - headers ["Data1", "Data2", "Data3"], # Row 1 - first data row ["Data4", "Data5", "Data6"] # Row 2 - second data row ]

CRITICAL INDEX REQUIREMENTS:

  • NEVER use index values like 1, 2, 10 without calling inspect_doc_structure first

  • ALWAYS get index from inspect_doc_structure 'total_length' field

  • Index must be a valid insertion point in the document

DATA FORMAT REQUIREMENTS:

  • Must be 2D list of strings only

  • Each inner list = one table row

  • All rows MUST have same number of columns

  • Use empty strings "" for empty cells, never None

  • Use debug_table_structure after creation to verify results

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
indexYesDocument position (MANDATORY: get from inspect_doc_structure 'total_length')
tab_idNoOptional tab ID to create the table in a specific tab
table_dataYes2D list of strings - EXACT format: [["col1", "col2"], ["row1col1", "row1col2"]]
document_idYesID of the document to update
header_rowsNoNumber of leading rows to mark as a repeating header that reappears after each page break. Must be between 0 and the number of table rows (default: 0 = none)
bold_headersNoWhether to make first row bold (default: true)
user_google_emailYesUser's Google email address

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Install Server

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already mark readOnlyHint=false and destructiveHint=false, so the mutation behavior is established. The description adds valuable behavioral context: it creates and populates a table in one operation, requires an index from inspect_doc_structure, enforces a 2D string-only format, and recommends debug_table_structure for verification. This goes beyond the annotations without contradicting them.

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

Conciseness3/5

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

The description is well-organized into sections and clearly front-loads the critical inspect_doc_structure call, but it is repetitive: the same index requirement is emphasized in the workflow, the critical requirements, and the schema parameter description. The all-caps warnings add urgency but also length without adding much information.

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 tool with 7 parameters and an output schema, the description covers the essential invocation context: the mandatory prior call, how to derive the index, the exact table_data structure, and a post-verification step. It does not need to explain return values because an output schema exists, and the remaining schema fields like tab_id, header_rows, and bold_headers are already described in the input schema.

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 100%, so the schema already documents every parameter. The description adds meaningful semantics beyond the schema by showing the exact 2D array format with a header row example, requiring equal-length rows, and explicitly stating that empty strings should be used instead of None. This compensates for any ambiguity in the bare schema types.

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 opening line states a specific verb and resource: 'Creates a table and populates it with data in one reliable operation.' This is clear and distinct from the generic tool name, though it does not explicitly contrast with sibling tools like insert_doc_elements or create_sheet.

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?

The description gives an explicit mandatory workflow: call inspect_doc_structure first, use the returned total_length as the index, format data as a 2D list, and verify with debug_table_structure. It clearly states when to invoke this tool and the required precondition, though it does not discuss when not to use it or name an alternative.

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

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/WorldCentralKitchen/google_workspace_mcp'

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