Skip to main content
Glama

Create Table with Data

create_table_with_data

Insert a table with headers and data rows into a Google Docs document at a specified position. Obtain the index from inspect_doc_structure first.

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
user_google_emailYesUser's Google email address
document_idYesID of the document to update
table_dataYes2D list of strings - EXACT format: [["col1", "col2"], ["row1col1", "row1col2"]]
indexYesDocument position (MANDATORY: get from inspect_doc_structure 'total_length')
bold_headersNoWhether to make first row bold (default: true)
tab_idNoOptional tab ID to create the table in a specific tab

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Beyond annotations (which only indicate mutability but not destructive), the description explains the exact behavior: creates a table at a specific index, populates it with provided data, formats headers optionally bold. It specifies that rows must have equal length and cells must be strings. However, it does not explain error handling for invalid indices or malformed data, nor the return value (though output schema exists). Good but not exhaustive.

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 well-structured with sections, all-caps warnings, step-by-step workflow, and a detailed example. While it is somewhat verbose and repeats some instructions (e.g., 'must call inspect_doc_structure' appears twice), every sentence adds necessary guidance. The front-loading with the main purpose and critical notes is effective.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (6 params, dependencies on other tools, specific data formatting), the description covers all aspects: mandatory prerequisite call, index acquisition, data format rules, optional features (bold headers, tab), and post-verification with debug_table_structure. It does not explain the output, but an output schema exists. For an agent, this description is complete and self-contained.

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 description coverage is 100%, but the description adds significant value: it provides an explicit example of table_data format, reiterates the index source (inspect_doc_structure total_length), explains bold_headers default and tab_id optionality. It goes beyond the schema by giving a concrete data format example and workflow integration.

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?

Clearly states the tool creates a table and populates it with data in one operation. Distinguishes from sibling tools like append_table_rows (which adds rows to existing tables) and debug_table_structure (which inspects). The verb 'creates' and resource 'table with data' are specific and unambiguous.

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?

Provides explicit mandatory workflow: must call inspect_doc_structure first, use its total_length as index, format data as 2D list, and optionally debug after. Gives when-to-use (single reliable operation for table creation) and when-not-to-use (never guess index). Clearly states prerequisites and alternative verification steps.

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/theolefort-cyber/mcpworkspace'

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