Skip to main content
Glama

update_file

Replace a Drive file's contents with a local file while preserving its ID, link, sharing, and revision history. Only works on files this app created.

Instructions

Replace the contents of a Drive file this app created with a local file (up to 100 MB), keeping its ID, link, sharing, and revision history. Refuses files the app did not create (created_by_app is false). This reads the given local file.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesAbsolute local path (~ is expanded); relative paths are rejected; the file with the new contents
file_idYesDrive file ID from search_files or get_file

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does well: it discloses the destructive overwrite ('Replace the contents'), the 100 MB cap, exactly what is preserved (ID, link, sharing, revision history), and the refusal condition. It omits required permissions/scopes and error behavior, which matters for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three short sentences, front-loaded with the core action and scope, then the refusal rule and transfer direction. No wasted prose; the trailing clause about reading the local file is useful but sits slightly oddly at the end.

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?

For a two-parameter mutation tool with no annotations and no output schema, the description covers overwrite semantics, size limit, preservation guarantees, and the eligibility gate. Missing only permission/scope expectations and any hint of what is returned.

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 100%, so both parameters are already documented in the schema, establishing a baseline of 3. The line 'This reads the given local file' adds directional clarity about path (source, not destination) but no further syntax or constraints beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Replace the contents of a Drive file') with concrete scope: only files this app created, up to 100 MB. The 'replace ... keeping its ID' framing implicitly separates it from upload_file (new file) without naming the sibling explicitly.

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?

Gives a clear precondition and an explicit exclusion ('Refuses files the app did not create (created_by_app is false)'), which tells the agent when this call will fail and should be avoided. It does not name upload_file as the alternative for new files, so routing is left partly to inference.

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