Skip to main content
Glama
Google Workspace MCP Server

Google Workspace MCP Server

by akilja24

create_table_with_data

Create and populate a Google Docs table from a 2D string list; first call inspect_doc_structure to get the required document insertion index.

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

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "user_google_email": "<user_google_email>",
      "document_id": "<document_id>",
      "table_data": "<table_data>",
      "index": "<index>"
    },
    "name": "create_table_with_data"
  }
}

Input Schema

NameRequiredDescriptionDefault
indexYes
table_dataYes
document_idYes
bold_headersNo
user_google_emailYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.13.1

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burden and does well: it declares the hard precondition on inspect_doc_structure, the exact input validation rules (2D list of strings, equal column counts, empty strings not None), and a recommended post-creation verification step. It omits permission/auth requirements and what happens to existing document content at the insertion point, which keeps it from a 5.

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 purpose and mandatory workflow are correctly front-loaded, but the text is padded with repeated ALL-CAPS admonitions ('CRITICAL', 'MANDATORY', 'ALWAYS', 'NEVER') and the table_data format is restated twice, once as an example and again in the Args block. The signal is there, but it is delivered with avoidable volume.

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 five-parameter mutation tool with zero schema description coverage, the description supplies the workflow, data format contract, index sourcing rule, and verification step, and an output schema already covers return values. Remaining gaps are secondary: error behavior for an invalid index and whether insertion displaces existing content.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate, and it does for all five parameters: table_data is defined with a concrete 2D-list example and cell-type rules, index is tied to the 'total_length' field of inspect_doc_structure, bold_headers is explained as bolding the first row with a stated default, and document_id / user_google_email are described. This adds substantial meaning beyond the bare schema types.

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 opening sentence gives a specific verb, resource, and scope: 'Creates a table and populates it with data in one reliable operation.' That distinguishes it from sibling mutation tools like batch_update_doc or create_doc, which do not describe a combined create-and-populate action.

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 spells out an explicit ordered workflow (inspect_doc_structure first, then this call), names the follow-up verification tool (debug_table_structure), and states the condition that selects each step. It also gives exclusions: never pass index values like 1, 2, or 10 without first calling inspect_doc_structure.

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

Deploy Server

Other Tools