Skip to main content
Glama
Google Workspace MCP Server

Google Workspace MCP Server

by mutallipp

Get Doc as Markdown

get_doc_as_markdown
Read-onlyIdempotent

Converts a Google Doc into clean Markdown that preserves headings, lists, tables, links, code, and formatting, with optional comment context for reviewing discussions.

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.

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>"
    },
    "name": "get_doc_as_markdown"
  }
}

Input 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, and comments are listed as document-wide. When omitted, every tab is rendered. Pass "" to read every tab of a URL that carries ?tab=. This filters output only: the whole document is still fetched.
headingNoText of a body heading (case-insensitive, must match exactly one) whose section to render instead of the whole document: the heading and everything below it up to the next heading of equal or shallower level. Comments are listed as document-wide. tab_id is required when the doc has multiple tabs.
document_idYesID of the Google Doc (or full URL). When a full URL is provided and it contains a ?tab= query parameter, that tab is used automatically unless tab_id is also specified (explicit tab_id takes precedence).
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
heading_levelNoOptional 1-6 heading level to narrow the heading match.
include_colorsNoFollow text that has an explicit RGB foreground color with "[color: #rrggbb]" (default: False). Theme colors are not shown.
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": SUGGESTIONS_INLINE with edit access, PREVIEW_WITHOUT_SUGGESTIONS with view-only access - "SUGGESTIONS_INLINE": Suggested changes appear inline, marked as {++inserted text++} and {--deleted text--} with a legend at the top; suggested text formatting is shown as if accepted - "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

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.8.0

TDQS

A4.2/5.0
Behavior4/5

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

The annotations already establish read-only, idempotent, non-destructive, and open-world behavior. Beyond that, the description adds useful behavioral detail about Markdown preservation and default comment handling, including that comment anchor text is retained for context.

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 front-loaded with the core action and output format, then uses two short paragraphs to explain the key differentiator and comment behavior. Every sentence contributes useful information without repetition.

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 ten-parameter read tool with a complete input schema and an output schema, the description covers the main behavior, formatting differences, and comment-context behavior well. It does not mention tab/heading filtering or suggestion modes, but those are fully documented in the schema.

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 coverage is 100%, so all ten parameters, including tab_id, heading, comment_mode, and suggestions_view_mode, are already documented in the schema. The description adds only general comment-context meaning and does not add parameter-specific semantics beyond the schema.

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: reads a Google Doc and returns Markdown. It explicitly distinguishes itself from get_doc_content by contrasting plain text with preserved Markdown formatting such as headings, lists, and tables.

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?

It gives clear guidance by naming get_doc_content as the plain-text alternative and explaining that this tool should be chosen when Markdown formatting is needed. It does not spell out when not to use it, but the contrast is sufficient for most selection decisions.

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