Skip to main content
Glama

restore_drive_revision

Restore a Drive file to an earlier revision by re-uploading its previous content. Works for binary files like PDFs, DOCX, and images, preserving file ID and permissions.

Instructions

Restore a Drive file's content to a previous revision.

Downloads the raw bytes of the specified revision and re-uploads them as the file's current content. This creates a NEW revision identical to the old one (it does not rewind the revision history — older revisions remain accessible). Original file ID, name, and sharing permissions are preserved.

Requires OAuth scope: https://www.googleapis.com/auth/drive (write). Large files (>100 MB) may take several seconds due to download+upload cycle.

Limitation: Google-native files (Docs, Sheets, Slides — MIME type application/vnd.google-apps.*) do NOT expose raw revision content via the Drive API. Attempting to restore a native file returns an explanatory error. For those, open the file in Google Docs/Sheets/Slides and use the built-in "Version history" UI (File > Version history > See version history). Binary-content files (PDFs, DOCX, XLSX, images, ZIP, etc.) are fully supported.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
user_google_emailYes
file_idYesDrive file ID (from a file URL like `drive.google.com/file/d/<file_id>/view`, or from `search_drive_files`). File must be a non-Google-native type.
revision_idYesID of the revision to restore TO. Get it from `get_drive_revisions` — the `id` field on each revision entry. The revision must still be retained (pinned with `keepForever` OR within Drive's normal retention window).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

With no annotations, the description fully discloses behavioral traits: the operation creates a new revision, preserves file metadata, requires write scope, may be slow for large files, and fails with an explanatory error for Google-native files. This is comprehensive.

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 yet thorough, with clear sections and bullet points. It front-loads the main action and efficiently conveys limitations and alternatives without redundancy.

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 the complexity of the operation and the presence of an output schema, the description covers all necessary context: behavior, prerequisites, limitations, and error cases. It is complete for an agent to invoke correctly.

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 coverage is 67%, and the description adds valuable context for file_id and revision_id (how to obtain them, constraints). The user_google_email parameter lacks description in both schema and description, but the overall guidance for two key parameters is strong.

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 purpose: 'Restore a Drive file's content to a previous revision.' It distinguishes this tool from siblings like 'get_drive_revisions' or 'update_drive_file' by explaining the unique mechanism (download+upload) and that it creates a new revision rather than rewinding history.

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 covers when to use (non-Google-native files) and when not (Google-native files), provides an alternative (use Google Docs UI), and lists prerequisites (OAuth scope, file and revision IDs). This guides the agent effectively.

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