-
Notifications
You must be signed in to change notification settings - Fork 264
feat: Enhanced Google Doc Editing Granularity #159
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
Conversation
Add full document editing and manipulation support to Google Docs tools, expanding beyond read-only operations to match Google Docs API capabilities. Features added: - Text operations: update_doc_text, find_and_replace_doc, format_doc_text - Structural elements: insert_doc_elements, insert_doc_image - Document management: update_doc_headers_footers, batch_update_doc - Helper functions module for common document operations Changes: - gdocs/docs_tools.py: Add 7 new editing functions with comprehensive error handling - gdocs/docs_helpers.py: New helper module with utility functions for document operations - README.md: Update Google Docs description to include full editing capabilities - CLAUDE.md: Add comprehensive documentation for new editing features - .mcp.json: Add MCP server configuration file - .gitignore: Resolve merge conflicts from upstream sync - uv.lock: Update dependencies from upstream merge The implementation uses Google Docs API batchUpdate operations for atomic document modifications and maintains compatibility with existing authentication and error handling patterns. All new tools follow the established @require_google_service decorator pattern and include proper scope management for write operations.
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces enhanced Google Docs editing capabilities by creating a modular architecture for complex document operations. It extracts business logic from tool functions into specialized manager classes and utility modules, improving maintainability while adding granular editing features like table creation with data population, text formatting, batch operations, and header/footer management.
Key changes include:
- New manager architecture for complex operations (table, header/footer, validation, batch)
- Comprehensive document structure parsing and analysis utilities
- Enhanced table operations with reliable data population
- Atomic batch updates for multiple document operations
Reviewed Changes
Copilot reviewed 10 out of 12 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| gdocs/managers/validation_manager.py | Centralized validation logic for all document operations |
| gdocs/managers/table_operation_manager.py | Complex table creation and population workflows |
| gdocs/managers/header_footer_manager.py | Header/footer content management and section handling |
| gdocs/managers/batch_operation_manager.py | Multi-operation batch execution with proper validation |
| gdocs/managers/init.py | Manager package initialization and exports |
| gdocs/docs_tools.py | Enhanced tool functions using new manager architecture |
| gdocs/docs_tables.py | Table-specific utilities for data formatting and validation |
| gdocs/docs_structure.py | Document parsing and structural analysis utilities |
| gdocs/docs_helpers.py | Common helper functions for API request building |
| README.md | Documentation update reflecting new editing capabilities |
Spun out of @cfdude's #155
Does fancy stuff like complex table structures, inline formatting and tons of little helpers to smooth out the llm bumps