Skip to main content
Glama
adexltd

MCP Google Suite

by adexltd

docs_get_content

Retrieve content from Google Docs using document ID to access and work with text data in Google Workspace.

Instructions

Get the contents of a Google Doc

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
document_idYesID of the document

Implementation Reference

  • The handler function that implements the 'docs_get_content' tool logic. It validates the document_id argument and delegates to DocsService.get_document_content to fetch the document content.
    async def _handle_docs_get_content(
        self, context: GoogleWorkspaceContext, arguments: dict
    ) -> Dict[str, Any]:
        """Handle docs get content requests."""
        document_id = arguments.get("document_id")
    
        if not document_id:
            raise ValueError("Document ID is required")
    
        logger.debug(f"Getting document content - ID: {document_id}")
        result = await context.docs.get_document_content(document_id=document_id)
        logger.debug("Document content retrieved successfully")
        return result
  • Input schema definition for the 'docs_get_content' tool, requiring a 'document_id' string parameter.
    types.Tool(
        name="docs_get_content",
        description="Get the contents of a Google Doc",
        inputSchema={
            "type": "object",
            "properties": {
                "document_id": {"type": "string", "description": "ID of the document"}
            },
            "required": ["document_id"],
        },
    ),
  • Code block that dynamically registers the handler for 'docs_get_content' (and other tools) by matching _handle_{tool.name} and adding to _tool_registry.
    for tool in self._get_tools_list():
        handler_name = f"_handle_{tool.name}"
        if hasattr(self, handler_name):
            handler = getattr(self, handler_name)
            self._tool_registry[tool.name] = handler
            logger.debug(f"Registered handler for {tool.name}")

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations provided, the description carries full burden but offers minimal behavioral insight. It states what the tool does but doesn't disclose whether it requires authentication, has rate limits, returns structured or plain text content, or handles errors. This leaves significant gaps for an agent to understand operational constraints.

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

Conciseness5/5

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

The description is a single, efficient sentence that directly states the tool's function without unnecessary words. It is front-loaded with the core purpose, making it easy to parse quickly. Every word earns its place by conveying essential information.

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

Completeness2/5

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

Given no annotations and no output schema, the description is incomplete for a tool that retrieves content. It doesn't explain what 'contents' means (e.g., text, formatting, metadata), the return format, or any prerequisites like needing the document ID upfront. For a read operation with undefined outputs, more context is needed.

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

Parameters3/5

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

Schema description coverage is 100%, with the single parameter 'document_id' clearly documented in the schema. The description adds no additional parameter semantics beyond implying the tool operates on a Google Doc, which is already evident from the tool name. This meets the baseline for high schema coverage.

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 description clearly states the action ('Get') and resource ('contents of a Google Doc'), making the purpose immediately understandable. It distinguishes from siblings like docs_create (creation) and docs_update_content (modification), though it doesn't explicitly contrast with drive_search_files which might also retrieve document content indirectly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. For example, it doesn't mention whether to use this for retrieving full document content versus sheets_get_values for spreadsheet data, or drive_search_files for finding documents first. The description assumes the user already knows when this tool is appropriate.

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