Skip to main content
Glama
taylorwilsdon

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

Import to Google Doc

import_to_google_doc

Imports Markdown, DOCX, TXT, HTML, RTF, or ODT files into Google Docs, automatically converting and preserving headings, lists, and text styles.

Instructions

Imports a file (Markdown, DOCX, TXT, HTML, RTF, ODT) into Google Docs format with automatic conversion.

Google Drive automatically converts the source file to native Google Docs format, preserving formatting like headings, lists, bold, italic, etc. Binary sources may be passed directly as base64_content. On a local server a file on disk can also be passed by path (preferred for batch operations, so callers do not need to load full file contents into their context).

Input Schema

NameRequiredDescriptionDefault
contentNoText content for text-based formats. Use only for short snippets or content already in memory.
file_urlNoRemote URL to fetch the file from (http/https).
file_nameYesThe name for the new Google Doc; the extension is dropped from the title. Without 'source_format', its extension also sets the format of 'content' or 'base64_content' (e.g. 'Notes.md' so Markdown tables are not imported as plain text).
file_pathNoLocal file path or file:// URL for any supported format (MD, TXT, HTML, DOCX, ODT, RTF). Appropriate for larger files than content, but file_path may still load the file into memory or perform non-streaming reads. Avoid very large files that could exceed memory or time limits; use streaming/chunked uploads or an alternative API for huge files.
folder_idNoThe ID of the parent folder. Defaults to 'root'.root
base64_sha256NoExpected SHA-256 of decoded base64_content. Recommended for binary payload integrity checks.
source_formatNoSource format hint ('md', 'markdown', 'docx', 'txt', 'html', 'rtf', 'odt'). Auto-detected from file_name extension if not provided.
base64_contentNoStandard base64-encoded bytes for a binary source such as DOCX or ODT.
user_google_emailYesThe user's Google email address. Required.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.2.0
    • changedInput schema / properties / file_name / description
      Previous value: -"The name for the new Google Doc (extension will be ignored)."New value: +"The name for the new Google Doc; the extension is dropped from the title. Without 'source_format', its extension also sets the format of 'content' or 'base64_content' (e.g. 'Notes.md' so Markdown tables are not imported as plain text)."
  2. Changed12 schema fields changedv1.28.0
    • removedInput schema / properties / base64_content / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / base64_content / type
      Added value: +"string"
    • removedInput schema / properties / base64_sha256 / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / base64_sha256 / type
      Added value: +"string"
    • removedInput schema / properties / content / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / content / type
      Added value: +"string"
    • removedInput schema / properties / file_path / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / file_path / type
      Added value: +"string"
    • removedInput schema / properties / file_url / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / file_url / type
      Added value: +"string"
    • removedInput schema / properties / source_format / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / source_format / type
      Added value: +"string"
  3. Changed2 schema fields changedv1.25.2
    • addedInput schema / properties / base64_content
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Standard base64-encoded bytes for a binary source such as DOCX or ODT."
      +}
    • addedInput schema / properties / base64_sha256
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Expected SHA-256 of decoded base64_content. Recommended for binary payload integrity checks."
      +}
  4. Addedv1.0.1

TDQS

A3.7/5.0
Behavior4/5

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

With annotations already declaring openWorldHint=true and idempotentHint=false, the description still adds real behavioral context: the conversion is performed by Drive, formatting (headings, lists, bold, italic) is preserved, and path-based reads may load the file into memory and hit size/time limits. It does not state that every call creates a new Doc (duplicate titles) or anything about auth, which would have pushed this to a 5.

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

Conciseness4/5

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

Front-loaded with one sentence stating purpose and supported formats, followed by two supporting paragraphs on conversion and input methods. Slight redundancy: 'into Google Docs format with automatic conversion' is immediately restated by 'Google Drive automatically converts the source file to native Google Docs format.'

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 9-parameter mutation tool with an output schema, full schema coverage and annotations in place, the description covers formats, conversion fidelity and the two input channels. Remaining gaps (duplicate-title creation, default folder behavior, permission/scope needs) are minor but non-trivial for a create operation.

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%, so the schema already explains content, file_path, base64_content, source_format, file_name, folder_id and base64_sha256 in detail. The description restates the base64/path distinction but adds no syntax, precedence rules, or format-hint semantics beyond what the schema provides — baseline 3.

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 opens with a specific verb and resource ('Imports a file ... into Google Docs format with automatic conversion') and enumerates the supported source formats, which is concrete. It does not, however, distinguish the tool from close siblings such as create_doc (which presumably also mints a Doc) or import_to_google_sheets/import_to_google_slides, so an agent must infer the routing.

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

Usage Guidelines3/5

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

There is useful guidance on input modes: base64_content for binary sources, and a disk path 'preferred for batch operations, so callers do not need to load full file contents into their context.' But there is no explicit when-to-use/when-not-to-use statement and no named alternative (e.g. create_doc for plain text authoring), so usage is only implied.

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