Skip to main content
Glama

export_doc_to_pdf

Export a Google Doc to PDF and save it directly to Google Drive. Specify document ID, optional filename and folder.

Instructions

Export a Google Doc as PDF and save the PDF back into Drive.

Side effects: creates a new PDF file in Drive (separate file from the Doc — the Doc itself is untouched). To download bytes without saving use get_drive_file_download_url with export_format="pdf". To convert the source to DOCX or other formats use get_drive_file_download_url. Requires both docs (read) and drive.file OAuth scopes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
user_google_emailYesThe user's Google email address (authenticated account).
document_idYesGoogle Doc ID (must be a native Doc — .docx stored in Drive is rejected).
pdf_filenameNoName for the generated PDF. Defaults to "<original>_PDF.pdf". ".pdf" extension is auto-appended.
folder_idNoDrive folder to save the PDF into. Defaults to My Drive root.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
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. It discloses the side effect of creating a new PDF file while leaving the original Doc untouched. It also mentions required scopes. However, it could mention rate limits or specific error conditions for non-native Docs.

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 concise with three focused sentences: first states the core function, second covers side effects and alternatives, third lists requirements. No extraneous words, front-loaded with main action.

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 that an output schema exists, the description need not detail return values. It adequately covers side effects, usage alternatives, and scopes. However, it might mention that the tool will fail if the document_id is not a native Doc, which is implied but not explicit.

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

Parameters4/5

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

Schema description coverage is 100%, so baseline is 3. The description adds value by noting that pdf_filename auto-appends '.pdf' and folder_id defaults to My Drive root. It also clarifies that document_id must be a native Doc, enriching the schema descriptions.

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 primary action: 'Export a Google Doc as PDF and save the PDF back into Drive.' It specifies the verb (export), resource (Google Doc), and outcome (save to Drive), distinguishing it from siblings that download bytes without saving.

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?

Explicitly provides when-not-to-use guidance by directing to 'get_drive_file_download_url with export_format="pdf"' for downloading without saving, and for other export formats. Also mentions required OAuth scopes, which helps the agent understand prerequisites.

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/HuntsDesk/ve-gws'

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