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
Nobody has claimed this yet.
- 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:
- Create a second file and repoint every link by hand, leaving a duplicate behind, or
- 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_fileto accepttextContent/base64Content+contentMimeTypeand issue the mediaPATCH, or - add a separate
update_file_contenttool.
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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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