-
Notifications
You must be signed in to change notification settings - Fork 347
feat(docs,drive): add styling tools and import_to_google_doc #324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
e334213 to
0d5e4fe
Compare
|
This is great, appreciate the contribution! Few asks - can you move the helper functions to docs_helpers instead of in the tool file? Additionally, I'd love to consolidate the tools a bit to avoid tool pollution. We've already got I'd consolidate into |
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.
Per maintainer feedback (@taylorwilsdon): - Delete format_text_style (redundant with modify_doc_text) - Delete create_list (redundant with insert_doc_elements) - Delete remove_list_formatting (use batch_update_doc) - Delete _hex_to_rgb helper (use existing _normalize_color) Preserved unique tools: - format_paragraph_style (paragraph-level properties) - apply_heading_style (named styles H1-H6) - import_to_google_doc (new import feature) Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
- Add 'leo' tier as standalone (non-cumulative) tier - Configure leo tier with curated tools for gmail, drive, docs, slides - Updated tool_tier_loader to support standalone tiers - Removed deprecated tools from leo tier (format_text_style, create_list, remove_list_formatting) Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
0d5e4fe to
c22ca65
Compare
|
Hi @taylorwilsdon, I've refactored the PR based on your feedback. Here's what changed: ✅ Removed Redundant ToolsPer your suggestion to consolidate with existing tools:
✅ Kept Unique ToolsThese provide functionality not available elsewhere:
✅ Rebased to v1.7.1
Testing✓ All imports successful
✓ format_text_style correctly removed
✓ create_list correctly removed
✓ remove_list_formatting correctly removed
✓ _hex_to_rgb correctly removed
✓ format_paragraph_style exists
✓ apply_heading_style exists
✓ import_to_google_doc exists in drive_tools
✓ Server starts successfully
✓ Tool registration working (16 tools loaded)SummaryBefore refactoring: +743 lines (5 new styling tools + 1 import tool) The PR is now much cleaner and follows the existing architecture better. Let me know if you'd like any other changes! |
Summary
Adds paragraph/heading styling tools for Google Docs and a file import tool for Google Drive.
Note: This PR has been refactored based on maintainer feedback to remove redundant tools and consolidate with existing functionality.
Google Docs styling tools
format_paragraph_style: Paragraph formatting (alignment, line spacing, indentation, spacing above/below)apply_heading_style: Apply H1-H6 heading styles using namedStyleType for semantic document structureGoogle Drive import tool
import_to_google_doc: Import files (Markdown, DOCX, TXT, HTML, RTF, ODT) as native Google Docs with automatic format conversion and SSRF protectionDesign decisions
Tools removed (redundant with existing functionality)
→ useformat_text_stylemodify_doc_text()instead→ usecreate_listinsert_doc_elements(element_type="list")instead→ useremove_list_formattingbatch_update_doc()insteadTools kept (unique functionality)
format_paragraph_style: Paragraph-level properties not available in other toolsapply_heading_style: Named style application (H1-H6) for semantic structureimport_to_google_doc: New import capability with SSRF validationFeatures
Test plan
format_paragraph_stylewith alignment and spacing optionsapply_heading_stylewith H1-H6 levelsimport_to_google_docwith markdown contentimport_to_google_docwith local .md fileimport_to_google_docwith local .docx file