Skip to main content
Glama

Replace document with Markdown

import_markdown
DestructiveIdempotent

Import Markdown by replacing the entire Google Doc content, converting headings, lists, tables, code blocks, and links into native Docs formatting. Content not expressed in the Markdown is removed.

Instructions

REPLACES the ENTIRE document content with the given Markdown via Drive conversion — the Markdown round-trip writer paired with export_document format=markdown. Supported Markdown (headings, bold/italic/strikethrough, links, ordered/unordered lists, tables, code blocks, images by URL) becomes native Docs formatting. Everything not expressed in the Markdown is LOST: existing text, comment anchors (comments survive but detach), positioned objects, headers/footers and extra tabs. For surgical edits use replace_range/style tools instead. Returns the Drive file resource (id, name, modifiedTime).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
markdownYesThe full new document content as Markdown.
document_idYesThe document id — the long id from the document URL (docs.google.com/document/d/<documentId>/edit) or from create_document output.
Behavior5/5

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

The description goes well beyond the annotations, which already flag destructiveHint=true and readOnlyHint=false. It details exactly what is lost (existing text, comment anchors, positioned objects, headers/footers, extra tabs), clarifies that comments survive but detach, and states the return value. This gives the agent a thorough understanding of the operation's consequences. No contradiction with annotations.

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 compact and every sentence earns its place: it leads with the destructive action, explains supported Markdown, enumerates what is lost, points to alternatives, and states the return value. There is no filler or redundant repetition of schema/annotation content.

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?

For a destructive full-document replacement tool with no output schema, the description is remarkably complete. It explains the conversion mechanism, lists supported Markdown features, describes exactly what is lost, mentions the survival/detachment of comments, provides alternatives, and identifies the return value. Nothing critical for an agent to invoke the tool correctly is missing.

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 already provides 100% coverage for both parameters with clear descriptions. The tool description adds some context about supported Markdown features and the full replacement semantics, but it does not substantially enhance parameter understanding beyond the schema. Baseline 3 is appropriate because the schema does the heavy lifting.

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 core action with a specific verb and resource: 'REPLACES the ENTIRE document content with the given Markdown'. It also distinguishes itself from siblings by referencing the Markdown round-trip writer paired with export_document and explicitly naming replace_range/style tools as the alternatives for surgical edits. An agent can immediately identify what this tool does and how it differs from other editing tools.

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 guidance on when to use this tool versus alternatives: 'For surgical edits use replace_range/style tools instead.' It also implies the appropriate use case is full-document replacement with Markdown, especially in a round-trip with export_document. This is clear, contextual, and gives the agent a decision rule.

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/A1-x-Tech/mcp-google-docs'

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