Skip to main content
Glama

Export a Google Workspace file

export_file
Read-onlyIdempotent

Export Google Docs, Sheets, Slides, or Drawings to PDF, DOCX, CSV, Markdown, or other formats. Provide the file ID and target MIME type; optionally save to a local path.

Instructions

Exports (converts) a Google-native file — Doc, Sheet, Slides, Drawing — to a regular format. mime_type picks the target: Docs → text/markdown, text/plain, text/html, application/pdf, application/vnd.openxmlformats-officedocument.wordprocessingml.document (.docx), application/rtf; Sheets → text/csv (FIRST sheet only), application/pdf, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet (.xlsx); Slides → application/pdf, text/plain, application/vnd.openxmlformats-officedocument.presentationml.presentation (.pptx); Drawings → image/png, image/svg+xml, application/pdf. With save_path the result is written to disk; without it small textual exports (≤100 KB) come back inline as content. Export is capped at 10 MB by the API — use the file's exportLinks (get_file) for bigger documents. Binary (non-Google) files are not exportable — use download_file.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_idYesThe file id — the long id from the Drive URL (drive.google.com/file/d/<fileId> or docs.google.com/.../d/<fileId>/edit) or from search_files/get_file output. Folders and shared-drive items are files too.
mime_typeYesTarget format, e.g. text/markdown, text/csv, application/pdf (see the description for what each Google type supports).
overwriteNoReplace save_path if it already exists (default false).
save_pathNoAbsolute local path to write the export to (required for binary or >100 KB output).
Behavior5/5

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

Beyond the annotations, the description discloses concrete behavior: exports are capped at 10 MB, only small textual exports under 100 KB return inline as content, Sheets exports only the first sheet, and save_path writes output to disk. These are non-obvious behavioral traits an agent needs to invoke the tool correctly.

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 first sentence front-loads the core purpose, and every subsequent segment earns its place. The MIME mapping is dense but necessary and clearly organized by source type. There is no filler or repetition of schema details.

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?

Given no output schema, the description adequately covers return behavior, size limits, unsupported file types, and where to route for alternatives. Combined with the schema's save_path requirement note, an agent has everything needed to call this tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

While the schema has 100% parameter coverage, the description adds critical semantics: the full MIME type mapping per Google file type, the meaning of save_path versus inline return, and the overwrite behavior context. The mime_type schema description even defers to the tool description, making this added meaning essential.

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 opens with a specific verb and resource: 'Exports (converts) a Google-native file — Doc, Sheet, Slides, Drawing — to a regular format.' It enumerates source types and target formats, and explicitly contrasts itself with download_file for binary files, making sibling differentiation clear.

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 routing guidance: 'Binary (non-Google) files are not exportable — use download_file' and 'use the file's exportLinks (get_file) for bigger documents.' It also tells the agent when to use save_path versus relying on inline content.

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-drive'

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