Skip to main content
Glama

Update Drive File

update_drive_file
Destructive

Update Google Drive file metadata or content in place, preserving ID, sharing, and comments. Append, prepend, or replace text, rename, move, or trash files in one call.

Instructions

Updates metadata, properties, and/or content of a Google Drive file.

Providing one of content, file_path, or file_url replaces the file's content in place, preserving the existing file ID, sharing, comments, and links. For native Google Docs/Sheets/Slides the source is uploaded with its source MIME type so the Drive API applies the same format conversion as import_to_google_doc (markdown headings, tables, bold, etc.). For any other file (.md, .txt, .pdf, ...) there is nothing to convert, so the bytes are written back as-is under the file's own MIME type. Metadata and content can be updated in a single call.

mode='append'/'prepend' splice content onto the file's existing text server-side, so only the new text has to be supplied — no need to send the whole file back to rewrite it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNoHow to apply the new content — 'replace' (default), 'append', or 'prepend'. Append/prepend require 'content' and a UTF-8 text file such as .md or .txt; a newline is inserted at the seam if neither side has one. For native Google Docs use insert_doc_elements, modify_doc_text, or find_and_replace_doc, which edit in place instead of rewriting the file.replace
nameNoNew name for the file.
contentNoNew text content for text-based formats (markdown, TXT, HTML).
file_idYesThe ID of the file to update. Required.
starredNoWhether to star/unstar the file.
trashedNoWhether to move file to/from trash.
file_urlNoRemote http(s) URL to fetch new content from.
file_pathNoLocal file path for binary formats (DOCX, ODT). Supports file:// URLs.
mime_typeNoNew MIME type (note: changing type may require content upload).
propertiesNoCustom key-value properties for the file.
add_parentsNoComma-separated folder IDs to add as parents.
descriptionNoNew description for the file.
source_formatNoSource format hint for conversion (md, markdown, docx, txt, html, rtf, odt). Auto-detected when omitted, and ignored for non-Google files, which are uploaded without conversion. Provide at most one of content/file_path/file_url.
remove_parentsNoComma-separated folder IDs to remove from parents.
user_google_emailYesThe user's Google email address. Required.
writers_can_shareNoWhether editors can share the file.
copy_requires_writer_permissionNoWhether copying requires writer permission.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Install Server

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already carry the mutation/destruction signal, and the description adds meaningful behavioral context beyond them: content replacement preserves the existing file ID and social metadata, native Google formats undergo MIME conversion, other files are written back as-is, and append/prepend splice server-side only the new text. No contradiction with the readOnlyHint=false or destructiveHint=true annotations.

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 front-loaded with the purpose, then uses dense, purposeful paragraphs for replacement semantics, conversion behavior, and append/prepend mode. Every sentence adds operational value, and the length is proportionate to a 17-parameter mutation tool.

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 100% schema coverage, rich annotations, and an output schema, the description covers the most decision-critical behavior: in-place content replacement, MIME conversion nuances, and append/prepend constraints. It does not need to restate parameter-by-parameter details because the schema already does that.

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 100%, so the baseline is 3, but the description adds cross-parameter meaning that the schema alone does not make obvious: exactly one of content/file_path/file_url should be provided for content replacement, append/prepend require content and a UTF-8 text file, and source_format interacts with conversion for native Google file types. This goes beyond individual parameter 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 opens with a specific verb-resource pair: 'Updates metadata, properties, and/or content of a Google Drive file.' It further distinguishes this tool from siblings by emphasizing in-place content replacement that preserves file ID, sharing, comments, and links, and by contrasting conversion behavior for native Google files versus other formats.

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 explicitly states when content replacement applies, which content source parameters are mutually exclusive, and what happens for native Google Docs versus plain files. The mode parameter also names concrete alternatives — insert_doc_elements, modify_doc_text, and find_and_replace_doc — for native-doc edits, giving the agent clear when-not-to-use guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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/WorldCentralKitchen/google_workspace_mcp'

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