Skip to main content
Glama

Export a doc to a file

export_doc

Download a Google Doc as a local file in PDF, DOCX, or other formats. Specify a folder and format to receive a server-rendered copy with original layout.

Instructions

Export a Google Doc to a real file on disk — pdf (default), docx, odt, rtf, txt, html, epub, or md. Google renders it server-side (File > Download in the UI), so page setup, pagination and layout match the editor. Returns the local path and byte size. Note: Drive refuses to export files larger than 10 MB.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dirYesabsolute local folder to save the export into (created if missing)
formatNodefault pdf
accountNoGoogle account email to use. Defaults to GDOCS_DEFAULT_ACCOUNT, or the sole account.
filenameNooverride the filename (default: the doc’s title + extension)
documentIdYes
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It explains that Google renders server-side, lists the return values (local path and byte size), and warns about the 10 MB export restriction. This goes beyond minimal expectations, though it could add details about overwrites or error behavior.

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 sentences, front-loaded with the core purpose, and every sentence adds value: format list, rendering fidelity, return values, and a size restriction. There is no fluff or redundancy.

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?

Given no output schema and five parameters, the description covers the key runtime behaviors: server-side rendering, page layout fidelity, return results, and the 10 MB file-size limit. It does not explain overwrite behavior or error handling, but the schema handles parameter definitions, so the description is reasonably complete for an export tool.

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 high (80%), so the baseline is 3. The description adds little beyond the schema for parameters; it repeats format defaults and lists options but does not clarify ambiguous fields like documentId. It provides marginal context about the directory creation, but that is already in 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 opens with a specific verb ('Export') and resource ('a Google Doc') and clearly states the output ('real file on disk'), enumerating all supported formats. It also distinguishes this from sibling tools like read_doc or download_images by focusing on the export-to-file operation.

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?

The description implies the use case (converting a Google Doc to a downloadable file) and gives a helpful note about the 10 MB limit, but it does not explicitly state when to use this tool over alternatives or mention any exclusions. The context is clear but not prescriptive.

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/dasasian/gdocs-mcp'

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