Skip to main content
Glama

Update Drive File

update_drive_file
Destructive

Update a Google Drive file's metadata, properties, or content in place, preserving its ID and sharing settings. Replace content by text, file path, or URL.

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. 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.) while preserving the existing file ID, sharing, comments, and links. Metadata and content can be updated in a single call.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
user_google_emailYesThe user's Google email address. Required.
file_idYesThe ID of the file to update. Required.
nameNoNew name for the file.
descriptionNoNew description for the file.
mime_typeNoNew MIME type (note: changing type may require content upload).
add_parentsNoComma-separated folder IDs to add as parents.
remove_parentsNoComma-separated folder IDs to remove from parents.
starredNoWhether to star/unstar the file.
trashedNoWhether to move file to/from trash.
writers_can_shareNoWhether editors can share the file.
copy_requires_writer_permissionNoWhether copying requires writer permission.
propertiesNoCustom key-value properties for the file.
contentNoNew text content for text-based formats (markdown, TXT, HTML).
file_pathNoLocal file path for binary formats (DOCX, ODT). Supports file:// URLs.
file_urlNoRemote http(s) URL to fetch new content from.
source_formatNoSource format hint for conversion (md, markdown, docx, txt, html, rtf, odt). Auto-detected when omitted. Provide at most one of content/file_path/file_url.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Annotations indicate destructive hint (true) and readOnly (false). The description adds key behaviors: content replacement 'in place' preserves file ID, sharing, comments, links; format conversion is consistent with import_to_google_doc. No contradiction with annotations; additional context provided.

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 two short paragraphs. The first sentence states the main purpose. The second paragraph provides essential details about content replacement and conversion. No redundant or filler sentences; every sentence adds value.

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 the complexity (16 params, 2 required) and presence of output schema, the description covers the primary use case and key constraints. It doesn't explain return values (handled by output schema) and omits scenarios like updating only metadata. However, it is sufficient for an agent to understand the core functionality.

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 baseline is 3. The description adds value by explaining the one-of requirement for content/file_path/file_url, the conversion behavior based on MIME type, and that metadata and content can be updated together. This goes beyond the schema's 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 clearly states 'Updates metadata, properties, and/or content of a Google Drive file.' It specifies the verb (update) and resource (Drive file), and distinguishes from siblings like create_drive_file or copy_drive_file by highlighting in-place content replacement and preservation of existing attributes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explains when to use content parameters ('Providing one of content, file_path, or file_url replaces the file's content') and allows combined metadata+content updates. It does not explicitly mention when not to use this tool versus alternatives like import_to_google_doc, but the context is clear for updating existing files.

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/chadvdwww-hash/worksuite-mcp'

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