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}")
Behavior2/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 states the tool 'Get[s] the contents' but doesn't specify what 'contents' includes (e.g., text, formatting, images), whether it requires specific permissions, or any rate limits. This leaves significant gaps in understanding how the tool behaves beyond its basic function.

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, direct sentence with no wasted words, making it highly concise and front-loaded. It efficiently communicates the core purpose without unnecessary elaboration.

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 the lack of annotations and output schema, the description is incomplete for a tool that retrieves content. It doesn't explain what 'contents' entails (e.g., plain text, HTML, structured data), potential errors, or how the output is formatted, leaving the agent with insufficient context to use the tool effectively.

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?

The input schema has 100% description coverage, with the single parameter 'document_id' clearly documented as 'ID of the document'. The description doesn't add any meaning beyond this, such as explaining where to find the ID or its format, but the schema provides adequate information, justifying the baseline score.

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. However, it doesn't differentiate from sibling tools like 'docs_update_content' or 'sheets_get_values' beyond the resource type, which prevents a perfect score.

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 clarify if this retrieves raw text, formatted content, or metadata, or how it differs from 'docs_update_content' (which might also access content). The description offers no context about prerequisites or exclusions.

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/adexltd/mcp-google-suite'

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