Skip to main content
Glama
ZatesloFL

Google Workspace MCP Server

by ZatesloFL

inspect_doc_structure

Analyze document structure to identify safe insertion points, locate existing tables, and retrieve statistics. Use this tool to ensure correct table placement and understand layout before making changes in Google Docs.

Instructions

Essential tool for finding safe insertion points and understanding document structure.

USE THIS FOR:

  • Finding the correct index for table insertion

  • Understanding document layout before making changes

  • Locating existing tables and their positions

  • Getting document statistics and complexity info

CRITICAL FOR TABLE OPERATIONS: ALWAYS call this BEFORE creating tables to get a safe insertion index.

WHAT THE OUTPUT SHOWS:

  • total_elements: Number of document elements

  • total_length: Maximum safe index for insertion

  • tables: Number of existing tables

  • table_details: Position and dimensions of each table

WORKFLOW: Step 1: Call this function Step 2: Note the "total_length" value Step 3: Use an index < total_length for table insertion Step 4: Create your table

Args: user_google_email: User's Google email address document_id: ID of the document to inspect detailed: Whether to return detailed structure information

Returns: str: JSON string containing document structure and safe insertion indices

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
detailedNo
document_idYes
user_google_emailYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively explains what the tool does (inspects document structure), why it's important (for safe insertion), and what the output contains. However, it doesn't mention potential limitations, error conditions, or performance characteristics that would be helpful for an agent.

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 clear sections (purpose, usage, critical notes, output details, workflow, args, returns) but could be more concise. Some sections like the workflow could be simplified, and the description uses 14 sentences where fewer might suffice while maintaining clarity.

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 (structural analysis with safety implications) and the presence of an output schema, the description is remarkably complete. It explains the purpose, usage scenarios, critical workflow integration, output interpretation, and parameter semantics, providing everything an agent needs to use this tool effectively.

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?

With 0% schema description coverage for 3 parameters, the description compensates well by explaining the 'detailed' parameter's purpose ('Whether to return detailed structure information') in the Args section. However, it doesn't explain the semantics of 'user_google_email' or 'document_id' beyond what the schema titles provide.

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 the tool's purpose as finding safe insertion points and understanding document structure, with specific verbs like 'finding', 'understanding', 'locating', and 'getting'. It distinguishes itself from sibling tools by focusing on document structure inspection rather than creation, modification, or content retrieval operations.

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 provides explicit usage guidance with a 'USE THIS FOR' section listing specific scenarios and a 'CRITICAL FOR TABLE OPERATIONS' section mandating when to call it ('ALWAYS call this BEFORE creating tables'). It also includes a detailed workflow with numbered steps, making it clear when and how to use this tool versus alternatives.

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

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