Skip to main content
Glama

Google Workspace MCP Server

by ZatesloFL

create_table_with_data

Generate and populate a table in Google Docs using a 2D list of data. Requires index from inspect_doc_structure for accurate document positioning. Ensures proper formatting and structure for reliable table creation.

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

Args: user_google_email: User's Google email address document_id: ID of the document to update table_data: 2D list of strings - EXACT format: [["col1", "col2"], ["row1col1", "row1col2"]] index: Document position (MANDATORY: get from inspect_doc_structure 'total_length') bold_headers: Whether to make first row bold (default: true)

Returns: str: Confirmation with table details and link

Input Schema

NameRequiredDescriptionDefault
bold_headersNo
document_idYes
indexYes
table_dataYes
user_google_emailYes

Input Schema (JSON Schema)

{ "properties": { "bold_headers": { "default": true, "title": "Bold Headers", "type": "boolean" }, "document_id": { "title": "Document Id", "type": "string" }, "index": { "title": "Index", "type": "integer" }, "table_data": { "items": {}, "title": "Table Data", "type": "array" }, "user_google_email": { "title": "User Google Email", "type": "string" } }, "required": [ "user_google_email", "document_id", "table_data", "index" ], "type": "object" }

Other Tools from Google Workspace MCP Server

Related Tools

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

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