Skip to main content
Glama
taylorwilsdon

Google Workspace MCP Server - Control Gmail, Calendar, Docs, Sheets, Slides, Chat, Forms & Drive

Get Doc as Markdown

get_doc_as_markdown
Read-onlyIdempotent

Convert a Google Doc to clean Markdown, preserving headings, lists, tables, and links. Include comment anchors and choose inline or appendix comment placement for full context.

Instructions

Reads a Google Doc and returns it as clean Markdown with optional comment context.

Unlike get_doc_content which returns plain text, this tool preserves document formatting as Markdown: headings, bold/italic/strikethrough, links, code spans, ordered/unordered lists with nesting, and tables.

When comments are included (the default), each comment's anchor text — the specific text the comment was attached to — is preserved, giving full context for the discussion.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tab_idNoOptional ID of a single tab to read (from inspect_doc_structure). When given, only that tab's content is rendered, without its child tabs and without a tab heading. When omitted, every tab is rendered.
document_idYesID of the Google Doc (or full URL)
comment_modeNoHow to display comments: - "inline": Footnote-style references placed at the anchor text location (default) - "appendix": All comments grouped at the bottom with blockquoted anchor text - "none": No comments includedinline
include_commentsNoWhether to include comments (default: True)
include_resolvedNoWhether to include resolved comments (default: False)
user_google_emailYesUser's Google email address
suggestions_view_modeNoHow to render suggestions in the returned content: - "DEFAULT_FOR_CURRENT_ACCESS": Default based on user's access level - "SUGGESTIONS_INLINE": Suggested changes appear inline in the document - "PREVIEW_SUGGESTIONS_ACCEPTED": Preview as if all suggestions were accepted - "PREVIEW_WITHOUT_SUGGESTIONS": Preview as if all suggestions were rejectedDEFAULT_FOR_CURRENT_ACCESS

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.28.0
    • removedInput schema / properties / tab_id / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / tab_id / type
      Added value: +"string"
  2. Changed1 schema field changedv1.26.0
    • addedInput schema / properties / tab_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Optional ID of a single tab to read (from inspect_doc_structure).\nWhen given, only that tab's content is rendered, without its child tabs\nand without a tab heading. When omitted, every tab is rendered."
      +}
  3. Addedv1.0.1

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare this tool read-only, non-destructive, and idempotent. The description adds context beyond the annotations by specifying the output is clean Markdown, that comments are included by default, and that comment anchor text is preserved for context. This is sufficient given the annotation coverage.

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 three focused paragraphs with no wasted words. It front-loads the core purpose, immediately distinguishes the tool from its sibling, and then explains the comment behavior. Every sentence contributes useful information.

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?

The description is complete for a read-only retrieval tool: it names the key sibling alternative, clarifies output format, explains comment behavior, and the output schema handles return value details. An agent has enough information to select and invoke this tool correctly.

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 provides complete descriptions for all 7 parameters, including enums-like options for comment_mode and suggestions_view_mode, so the schema carries the parameter documentation burden. The description adds some useful semantic context about comment anchoring and default behavior, but does not need to compensate for any schema gaps.

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 states a specific verb and resource: it reads a Google Doc and returns it as Markdown. It also explicitly differentiates itself from get_doc_content, which returns plain text, making the tool's purpose unmistakable.

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

Usage Guidelines4/5

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

The description clearly names get_doc_content as the alternative and explains the distinguishing factor: this tool preserves formatting as Markdown while get_doc_content returns plain text. It implies when to choose this tool, though it does not explicitly state 'use get_doc_content when plain text is sufficient'.

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