Add _validate_url_not_internal() check for HTTP/HTTPS URLs in
create_drive_file, matching the existing protection in
import_to_google_doc (line 888).
Closes#452
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add export_format='pdf' option for Google Sheets in get_drive_file_download_url
- Previously only supported csv and xlsx formats for Sheets
- Update docstring and parameter documentation
- Tested with production Google Sheet and confirmed working
Google Docs styling tools:
- format_text_style: Rich text formatting (bold, italic, underline, colors, fonts)
- format_paragraph_style: Paragraph formatting (alignment, spacing, indentation)
- apply_heading_style: Apply H1-H6 heading styles using namedStyleType
- create_list: Convert paragraphs to bullet/numbered lists with visual indentation
- remove_list_formatting: Remove list formatting from paragraphs
Google Drive import tool:
- import_to_google_doc: Import files (MD, DOCX, TXT, HTML, RTF, ODT) as native
Google Docs with automatic format conversion by Google Drive
Security:
- SSRF protection for file_url parameter (blocks localhost and private IPs)
All tools include input validation, error handling, and comprehensive docstrings.
New tools: share_drive_file, batch_share_drive_file, get_drive_shareable_link,
get_drive_file_permissions, update_drive_permission, remove_drive_permission,
transfer_drive_ownership
share_drive_file supports user/group/domain/anyone types, so there's no need
for a separate make_drive_file_public tool.
Implements a new tool that follows the same pattern as Gmail attachment downloads:
- Downloads files from Google Drive (handles shortcuts automatically)
- For Google native files (Docs/Sheets/Slides), exports to useful formats:
* Docs → PDF (default) or DOCX
* Sheets → XLSX (default) or CSV
* Slides → PDF (default) or PPTX
- Saves files to AttachmentStorage (reuses existing infrastructure)
- Returns a download URL that works with the existing /attachments/{file_id} route
- Files expire after 1 hour (same as Gmail attachments)
- Handles stateless mode gracefully
This enables agents to download binary files from Drive, which was previously
not possible with get_drive_file_content (text-only). The agent receives a
URL it can fetch to download the file, following the same pattern as Gmail
attachment downloads.