anthropics / anthropics/claude-code

[FEATURE] Google Drive connector: no way to update an existing file's content (update_file is metadata-only), so revisions require a browser

Open
#95,292 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area:mcp enhancement
Dominant language
TypeScript
Stars
147k
Forks
24k
PR merge metrics
PR metrics pending

Description

Summary

The Google Drive connector can create files with content (create_file, with textContent / base64Content) but there is no way to replace the content of a file that already exists. update_file accepts only title and parentId — its own description says "currently only title and parent_id are supported".

The Drive API supports this: PATCH https://www.googleapis.com/upload/drive/v3/files/{fileId}?uploadType=media creates a new revision in place, keeping the file id and the version history. The connector holds the OAuth token that could make that call; nothing in the tool surface exposes it.

Why it matters

Keeping the file id stable is the whole point. Every link to that file — a calendar event description, a Google Chat smart chip, a shared bookmark, an email someone already sent — points at the id. Today the only options a session has are:

  1. Create a second file and repoint every link by hand, leaving a duplicate behind, or
  2. Drive a real browser session to File → Manage versions → Upload new version.

Option 1 produces exactly the clutter users object to. Option 2 needs a logged-in browser and a local file input, so when browser automation is unavailable the revision simply cannot happen, even though the connector is authenticated and working.

Concrete case

A briefing document lives in a shared Drive folder and is linked from a Google Calendar event. Revising it should be one new revision of that file. Instead it required uploading a new file, editing the calendar event to the new id, and removing the old one — and when the browser route was down, the corrected version could not be applied at all.

Requested

Either:

  • extend update_file to accept textContent / base64Content + contentMimeType and issue the media PATCH, or
  • add a separate update_file_content tool.

Ideally also expose keepRevisionForever and let revisions.list be read, so a session can confirm the new revision landed.

Related

Not a duplicate of #30457 (connector connected but tools not exposed) — the tools are exposed and working here; the write verb is the gap.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the connector entry points for update_file and create_file, then compare their content handling with the Google Drive media PATCH endpoint described here. Implement one of the requested content-update surfaces while preserving the existing file ID and creating a revision; revision retention and revisions.list can be considered as the additional requested scope.

Written by the indexing model from the issue text.

Assessment

Tech stack
google-cloud, python
Domain
api, cloud
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.