Skip to content

feat: add Drive file content update, delete, and MIME auto-detection - #569

Open
addhass wants to merge 7 commits into
taylorwilsdon:mainfrom
addhass:feat/drive-file-content-and-delete
Open

feat: add Drive file content update, delete, and MIME auto-detection#569
addhass wants to merge 7 commits into
taylorwilsdon:mainfrom
addhass:feat/drive-file-content-and-delete

Conversation

@addhass

@addhass addhass commented Mar 13, 2026

Copy link
Copy Markdown

Summary

Three improvements to Google Drive file management:

  • Auto-detect MIME type in create_drive_file: When mime_type is left as the default text/plain, infer the correct type from the file extension (.mdtext/markdown, .jsonapplication/json, .csvtext/csv, etc.). No behavior change when mime_type is explicitly provided.

  • New update_drive_file_content tool: Overwrites the content of existing text-based files (.md, .txt, .csv, .json, .html, .xml, .yaml) using the same MediaIoBaseUpload pattern as create_drive_file. Includes MIME type validation to prevent corruption of binary files and native Google Docs/Sheets/Slides (with helpful error messages pointing to the correct tools).

  • New delete_drive_file tool: Dedicated deletion tool that handles the full lifecycle — trash by default, auto-permanent-delete if already trashed, permanent=True to skip trash. Solves the confusing "no changes" response from update_drive_file(trashed=True) on already-trashed files. Docstring includes "delete", "remove", and "trash" keywords for LLM discoverability.

Both new tools are placed in the drive.extended tier and follow all existing patterns (decorator chain, resolve_drive_item for shortcut resolution, supportsAllDrives, handle_http_errors, require_google_service).

Motivation

When using workspace-mcp via Claude Desktop (or any MCP client) to manage markdown files in Google Drive:

  1. .md files were created as text/plain unless the caller explicitly set mime_type
  2. There was no way to update file content in place — update_drive_file only handles metadata
  3. There was no delete tool at all — the only removal path was update_drive_file(trashed=True), which silently returned "no changes" if the file was already trashed

These gaps made it impossible to have full CRUD on uploaded text files.

Test plan

All tested manually via workspace-mcp --cli:

  • create_drive_file with .md extension → MIME type is text/markdown (was text/plain)
  • create_drive_file with explicit mime_type → uses provided value (unchanged)
  • update_drive_file_content on .md file → content updated, char count reported
  • update_drive_file_content on Google Doc → UserInputError with helpful message
  • update_drive_file_content on non-existent file → 404 from resolve_drive_item
  • delete_drive_file on live file → moved to trash
  • delete_drive_file on already-trashed file → permanently deleted (auto-escalation)
  • delete_drive_file with permanent=True → permanently deleted immediately
  • delete_drive_file on non-existent file → 404 error
  • ruff check passes
  • ruff format passes

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Update content of text-based Google Drive files (supports text, Markdown, CSV, HTML, YAML, XML, JSON).
    • Delete Google Drive files with option to move to trash or permanently remove.
    • Automatic MIME-type detection for text uploads to improve file-type assignment and handling.

Addam Hassan and others added 4 commits March 13, 2026 12:47
When mime_type is left as the default "text/plain", infer the correct
MIME type from the file extension (.md → text/markdown, .json →
application/json, .csv → text/csv, etc.).

This ensures files created via MCP are stored with the correct MIME type
in Google Drive without requiring callers to specify it explicitly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds a new tool that overwrites the content of existing text-based files
(.md, .txt, .csv, .json, .html, .xml, .yaml) in Google Drive using the
same MediaIoBaseUpload pattern as create_drive_file.

Includes MIME type validation to prevent accidental corruption of binary
files and native Google Docs/Sheets/Slides (with helpful error messages
pointing to the correct tools).

Placed in the drive.extended tier alongside update_drive_file.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds a dedicated delete tool that handles the full deletion lifecycle:
- Default: moves file to trash (recoverable for 30 days)
- If file is already trashed: automatically permanently deletes
- permanent=True: skips trash, deletes immediately

The smart auto-escalation prevents the confusing "no changes" response
that occurs when using update_drive_file(trashed=True) on an already-
trashed file. The docstring includes "delete", "remove", and "trash"
keywords so LLM-based callers can discover it naturally.

Placed in the drive.extended tier.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Mar 13, 2026

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

Added two Drive actions and their implementations: update_drive_file_content (overwrite text-based Drive files with MIME validation/optional override) and delete_drive_file (trash or permanent delete). create_drive_file gained MIME auto-detection and UserInputError was added to imports.

Changes

Cohort / File(s) Summary
Tool Tier Configuration
core/tool_tiers.yaml
Added update_drive_file_content and delete_drive_file to the drive extended tier action list.
Google Drive Tools Implementation
gdrive/drive_tools.py
Imported UserInputError; added UPDATABLE_TEXT_MIME_TYPES; added update_drive_file_content (validate and overwrite text-based files, optional mime_type override) and delete_drive_file (trash by default, permanent=True for permanent deletion); enhanced create_drive_file to auto-detect MIME type from file extension and annotated optional params.

Sequence Diagram(s)

sequenceDiagram
    participant Caller
    participant DriveTools as gdrive/drive_tools.py
    participant GoogleDrive as Google Drive API

    Caller->>DriveTools: update_drive_file_content(file_id, content, [mime_type])
    DriveTools->>DriveTools: validate/resolve mime_type (UPDATABLE_TEXT_MIME_TYPES)
    DriveTools->>GoogleDrive: files.get(fileId) (fetch metadata/mimeType)
    GoogleDrive-->>DriveTools: file metadata (mimeType, name)
    DriveTools->>GoogleDrive: files.update(fileId, media=content, mimeType)
    GoogleDrive-->>DriveTools: updated file response
    DriveTools-->>Caller: summary (name, id, chars, link)

    Caller->>DriveTools: delete_drive_file(file_id, permanent=False)
    DriveTools->>GoogleDrive: files.delete(fileId, supportsAllDrives, permanent?)
    GoogleDrive-->>DriveTools: deletion confirmation
    DriveTools-->>Caller: confirmation message
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Possibly related PRs

Suggested labels

enhancement

Suggested reviewers

  • taylorwilsdon

Poem

🐇 I nibble code and tidy drives with care,

I swap the text and toss what shouldn't be there.
Update, delete, a hop and a cheer,
New tools in paw — the files are clear!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main changes: adding Drive file content update, delete functionality, and MIME auto-detection capabilities.
Description check ✅ Passed The PR description is comprehensive with clear summary, type of change (new feature), detailed test plan showing manual testing completed, and addresses the template requirements.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (1)
gdrive/drive_tools.py (1)

1755-1759: Set explicit public tool metadata instead of relying on decorator defaults.

Please give these tools explicit FastMCP name/description values so the exported IDs stay imperative camelCase, and keep core/tool_tiers.yaml aligned with the public IDs.

As per coding guidelines, "FastMCP tool names must be imperative, camelCase, and ≤3 words; descriptions must be a single sentence in present tense with parameter hints."

Also applies to: 1842-1845

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@gdrive/drive_tools.py` around lines 1755 - 1759, The tool decorated around
function update_drive_file_content lacks explicit FastMCP metadata; update the
`@server.tool`() decorator to include name="updateDriveFileContent" and a
single-sentence present-tense description with parameter hints (e.g., "Update a
Drive file's content given fileId and newContent."), ensuring the name is
imperative camelCase and ≤3 words; apply the same pattern to the other Drive
tool with missing metadata in the nearby block (the other decorated Drive
function) so exported IDs and core/tool_tiers.yaml remain aligned.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@gdrive/drive_tools.py`:
- Around line 1785-1787: The log in update_drive_file_content currently emits
the raw user_google_email; change the logger.info calls to avoid logging PII by
either removing the user email or replacing it with a redacted identifier (e.g.,
mask the email local-part or emit a stable hashed identifier), and apply the
same change to the other logger.info calls in this module that include
user_google_email; update the log message to include only non-PII context
(file_id, operation) and the redacted or hashed user token instead of the raw
email.
- Around line 1882-1905: The current logic escalates from trashing to deleting
when a retry sees already_trashed=True, which makes permanent=False
non-idempotent; change the branch so that files().delete(...) is called only
when permanent is True, and if permanent is False and already_trashed is True
return an explicit "already in trash" message (use the variables file_id and
file_name) instead of deleting; update the block around service.files().delete
and service.files().update so permanent controls deletion and non-permanent
retries simply return the already-in-trash response.
- Around line 1804-1828: Validate the mime_type override before using it by
ensuring mime_type (when provided) is in UPDATABLE_TEXT_MIME_TYPES and
reject/raise if it’s not (use the existing current_mime/mime_type/content_mime
logic), and when calling service.files().update include body={"mimeType":
content_mime} (in addition to media_body=media) so the file's stored MIME type
is persisted; update the code around the variables current_mime, mime_type,
content_mime, MediaIoBaseUpload media and the service.files().update call to
perform these checks and add the body param.

---

Nitpick comments:
In `@gdrive/drive_tools.py`:
- Around line 1755-1759: The tool decorated around function
update_drive_file_content lacks explicit FastMCP metadata; update the
`@server.tool`() decorator to include name="updateDriveFileContent" and a
single-sentence present-tense description with parameter hints (e.g., "Update a
Drive file's content given fileId and newContent."), ensuring the name is
imperative camelCase and ≤3 words; apply the same pattern to the other Drive
tool with missing metadata in the nearby block (the other decorated Drive
function) so exported IDs and core/tool_tiers.yaml remain aligned.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: f93fe4e0-6b2f-472b-8560-b8cf00d43409

📥 Commits

Reviewing files that changed from the base of the PR and between 5a2e1f3 and 0f6ee58.

📒 Files selected for processing (2)
  • core/tool_tiers.yaml
  • gdrive/drive_tools.py

Comment thread gdrive/drive_tools.py
Comment thread gdrive/drive_tools.py
Comment thread gdrive/drive_tools.py Outdated
- Validate mime_type override in update_drive_file_content: reject
  non-text MIME types when caller explicitly provides one
- Make delete_drive_file idempotent: when permanent=False and file is
  already trashed, return informational message instead of escalating
  to permanent deletion

Skipped PII logging and @server.tool() metadata feedback — both would
diverge from the existing patterns used by all other tools in this file.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (2)
gdrive/drive_tools.py (2)

1811-1834: ⚠️ Potential issue | 🟠 Major

Persist MIME metadata when mime_type override is provided.

Line 1811 allows a MIME override, but Line 1828-Line 1833 only sends media_body. If callers pass mime_type, include body={"mimeType": content_mime} so metadata changes are persisted as documented.

🩹 Proposed fix
-    updated_file = await asyncio.to_thread(
-        service.files()
-        .update(
-            fileId=file_id,
-            media_body=media,
-            fields="id, name, modifiedTime, webViewLink",
-            supportsAllDrives=True,
-        )
-        .execute
-    )
+    update_kwargs: Dict[str, Any] = {
+        "fileId": file_id,
+        "media_body": media,
+        "fields": "id, name, mimeType, modifiedTime, webViewLink",
+        "supportsAllDrives": True,
+    }
+    if mime_type is not None:
+        update_kwargs["body"] = {"mimeType": content_mime}
+
+    updated_file = await asyncio.to_thread(
+        service.files().update(**update_kwargs).execute
+    )
For Google Drive API v3 `files.update`, when uploading with `media_body`, does changing file MIME type require `body={"mimeType": "..."}`
to persist metadata, or is media upload MIME alone sufficient?
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@gdrive/drive_tools.py` around lines 1811 - 1834, The code currently only
passes media_body to service.files().update (see MediaIoBaseUpload,
content_mime, and the update call), so an explicit metadata change when a
mime_type override is provided isn’t persisted; modify the files().update
invocation to include body={"mimeType": content_mime} (only when mime_type is
provided/overridden) alongside media_body and existing params (fileId,
media_body, fields, supportsAllDrives) so the new MIME metadata is sent to Drive
and persisted.

1785-1787: ⚠️ Potential issue | 🟠 Major

Remove raw user email from new tool logs.

Line 1786 and Line 1876 log user_google_email directly. Please redact or omit it.

🔒 Proposed fix
-    logger.info(
-        f"[update_drive_file_content] Updating content of {file_id} for {user_google_email}"
-    )
+    logger.info(
+        f"[update_drive_file_content] Updating content of file_id='{file_id}'"
+    )

-    logger.info(
-        f"[delete_drive_file] Deleting {file_id} for {user_google_email} (permanent={permanent})"
-    )
+    logger.info(
+        f"[delete_drive_file] Deleting file_id='{file_id}' (permanent={permanent})"
+    )

Based on learnings, Applies to **/*.py : Never log or leak secrets, refresh tokens, or PII in exceptions or event streams.

Also applies to: 1875-1877

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@gdrive/drive_tools.py` around lines 1785 - 1787, The log statements in
update_drive_file_content (logger.info calls that include user_google_email)
must not emit raw user email; remove or redact the PII by either omitting
user_google_email or replacing it with a non-sensitive token (e.g., user_id or
"<redacted>") and update both occurrences (the logger.info at the
update_drive_file_content call and the similar logger at the other block around
lines 1875-1877). Ensure the new message keeps context (e.g., "Updating content
of {file_id} for user=<redacted>") and do not introduce any new PII in exception
logs.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@gdrive/drive_tools.py`:
- Around line 1755-1760: The `@server.tool`() decorators on the functions
update_drive_file_content and delete_drive_file need explicit name and
description arguments to conform to FastMCP guidelines: add name values in
imperative camelCase (e.g., name="updateDriveFile" for update_drive_file_content
and name="deleteDriveFile" for delete_drive_file) and supply a single-sentence,
present-tense description that includes parameter hints (e.g., "Update the
content of a Drive file given fileId and new content.") while leaving the Python
function names unchanged; also simplify each function's multi-sentence docstring
to a single-sentence present-tense description with parameter hints to match the
decorator description.

---

Duplicate comments:
In `@gdrive/drive_tools.py`:
- Around line 1811-1834: The code currently only passes media_body to
service.files().update (see MediaIoBaseUpload, content_mime, and the update
call), so an explicit metadata change when a mime_type override is provided
isn’t persisted; modify the files().update invocation to include
body={"mimeType": content_mime} (only when mime_type is provided/overridden)
alongside media_body and existing params (fileId, media_body, fields,
supportsAllDrives) so the new MIME metadata is sent to Drive and persisted.
- Around line 1785-1787: The log statements in update_drive_file_content
(logger.info calls that include user_google_email) must not emit raw user email;
remove or redact the PII by either omitting user_google_email or replacing it
with a non-sensitive token (e.g., user_id or "<redacted>") and update both
occurrences (the logger.info at the update_drive_file_content call and the
similar logger at the other block around lines 1875-1877). Ensure the new
message keeps context (e.g., "Updating content of {file_id} for
user=<redacted>") and do not introduce any new PII in exception logs.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c05f4c2e-a406-47aa-aa58-8d1a88b01fba

📥 Commits

Reviewing files that changed from the base of the PR and between 0f6ee58 and b02a272.

📒 Files selected for processing (1)
  • gdrive/drive_tools.py

Comment thread gdrive/drive_tools.py
When callers explicitly pass mime_type to update_drive_file_content,
include body={"mimeType": content_mime} in the files().update call so
the file's stored metadata MIME type is updated alongside the content.

The MediaIoBaseUpload mimetype only sets the upload Content-Type header;
the Drive API metadata field needs to be set separately.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@addhass

addhass commented Mar 13, 2026

Copy link
Copy Markdown
Author

Thanks for the thorough reviews @coderabbitai. We've addressed the actionable items:

  • ✅ MIME type validation on override (commit b02a272)
  • ✅ Delete idempotency — permanent=False no longer auto-escalates (commit b02a272)
  • ✅ MIME metadata persistence via body={"mimeType": ...} when override provided (commit 50fe76a)

Two items we intentionally left as-is:

PII in logs: Every existing tool in drive_tools.py logs user_google_email the same way — update_drive_file (line 1607), create_drive_file (line 604), search_drive_files, etc. Changing this only in our new tools would create an inconsistent codebase. A PII logging cleanup across all tools would be a welcome separate PR, but it's out of scope here.

@server.tool() metadata: No existing tool in drive_tools.py (or anywhere in the codebase) passes name= or description= to @server.tool(). FastMCP derives tool names from the Python function names, and the existing 110+ tools all rely on this default. Adding explicit metadata only to our two new tools would be inconsistent with the rest of the codebase.

Both of these are valid improvements to the project as a whole — just not something we should introduce as one-off changes in a feature PR.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@gdrive/drive_tools.py`:
- Around line 1811-1818: The code allows an explicit empty string mime_type to
bypass validation; change the validation in the content_mime/mime_type block to
treat an empty string as invalid by raising UserInputError when mime_type == ""
(distinct from mime_type is None), keeping the existing behavior that None falls
back to current_mime; reference content_mime, mime_type, current_mime,
UPDATABLE_TEXT_MIME_TYPES and UserInputError when making the check so the error
is raised for empty-string overrides before checking membership in
UPDATABLE_TEXT_MIME_TYPES.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 1399c37c-aae1-4f7d-a401-d29e185a244a

📥 Commits

Reviewing files that changed from the base of the PR and between b02a272 and 50fe76a.

📒 Files selected for processing (1)
  • gdrive/drive_tools.py

Comment thread gdrive/drive_tools.py Outdated
@coderabbitai

coderabbitai Bot commented Mar 13, 2026

Copy link
Copy Markdown
Contributor

@addhass: Thanks for the detailed explanation and for addressing all the actionable items! The reasoning for both intentional non-changes is sound:

  • PII in logs – Agreed that a one-off change would be inconsistent. A codebase-wide PII logging cleanup is the right scope for that. Would you like me to open a follow-up issue to track it?
  • @server.tool() metadata – Deferring to the existing convention of relying on FastMCP's function-name derivation makes sense given 110+ tools follow the same pattern. Similarly happy to open a tracking issue if useful.

The PR looks good to me.


✏️ Learnings added
Learnt from: addhass
URL: https://github.com/taylorwilsdon/google_workspace_mcp/pull/569

Timestamp: 2026-03-13T13:28:55.605Z
Learning: In gdrive/drive_tools.py (and throughout the google_workspace_mcp codebase), all tools log `user_google_email` directly in log statements. This is a consistent pattern across 110+ tools (e.g., update_drive_file at line 1607, create_drive_file at line 604, search_drive_files). Do not flag PII logging for individual new tools as an issue — a codebase-wide PII logging cleanup is the appropriate scope.

Learnt from: addhass
URL: https://github.com/taylorwilsdon/google_workspace_mcp/pull/569

Timestamp: 2026-03-13T13:28:55.605Z
Learning: In gdrive/drive_tools.py (and throughout the google_workspace_mcp codebase), no tool passes `name=` or `description=` to `server.tool()`. FastMCP derives tool names from Python function names. This is a deliberate convention across all 110+ tools. Do not suggest adding explicit `name=` or `description=` metadata to `server.tool()` for individual tools, as it would be inconsistent.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

✅ Actions performed

Comments resolved. Auto-approval is disabled; enable reviews.request_changes_workflow to approve automatically.

Treat mime_type="" as invalid input rather than silently falling back
to the file's current MIME type. Normalizes with strip() and raises
UserInputError for empty strings.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
gdrive/drive_tools.py (1)

613-631: Consider documenting the auto-detection override behavior.

The auto-detection triggers when mime_type == "text/plain", which includes cases where the caller explicitly passes mime_type="text/plain". If a caller explicitly wants text/plain for a .json file, the auto-detection will override it to application/json.

This is a reasonable design tradeoff, but the docstring (Line 603) should clarify that auto-detection activates for "text/plain" regardless of whether it was explicitly passed or defaulted.

📝 Suggested docstring clarification
-        mime_type (str): The MIME type of the file. Defaults to 'text/plain'.
+        mime_type (str): The MIME type of the file. Defaults to 'text/plain'.
+            When 'text/plain', the MIME type is auto-detected from file extension
+            (.md, .csv, .json, .html, .xml, .yaml). Pass a different MIME type
+            explicitly to override auto-detection.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@gdrive/drive_tools.py` around lines 613 - 631, Update the create_drive_file
docstring to explicitly state that the MIME auto-detection runs when mime_type
== "text/plain" (not only when omitted), so an explicit mime_type="text/plain"
will be overridden based on the file extension (e.g., .json -> application/json,
.md -> text/markdown) by the _ext_mime_map logic; mention how callers can force
literal text/plain (e.g., by passing a different sentinel or bypassing
auto-detection) and include a brief list or reference to the common extensions
handled by the auto-detection so callers understand which extensions will be
remapped.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@gdrive/drive_tools.py`:
- Around line 613-631: Update the create_drive_file docstring to explicitly
state that the MIME auto-detection runs when mime_type == "text/plain" (not only
when omitted), so an explicit mime_type="text/plain" will be overridden based on
the file extension (e.g., .json -> application/json, .md -> text/markdown) by
the _ext_mime_map logic; mention how callers can force literal text/plain (e.g.,
by passing a different sentinel or bypassing auto-detection) and include a brief
list or reference to the common extensions handled by the auto-detection so
callers understand which extensions will be remapped.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 28932a2b-30ca-4148-b7ef-7caef3d5d7c9

📥 Commits

Reviewing files that changed from the base of the PR and between 50fe76a and dd7ab8e.

📒 Files selected for processing (1)
  • gdrive/drive_tools.py

@taylorwilsdon taylorwilsdon self-assigned this Mar 17, 2026
@taylorwilsdon taylorwilsdon added the enhancement New feature or request label Mar 17, 2026
edisonb24 added a commit to Construct-Digital/google_workspace_mcp that referenced this pull request Jul 19, 2026
…uto-detect

Adds update_drive_file_content (in-place files.update with media body,
preserves file ID), delete_drive_file, and create_drive_file MIME
auto-detection. Resolved conflicts against newer upstream main:
- union imports (+UserInputError)
- kept HEAD base64-capable create_drive_file validation + PR MIME detect
- kept PR new tools + HEAD annotated get_drive_shareable_link decorator

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants