Commit Graph

73 Commits

Author SHA1 Message Date
Taylor Wilsdon
a87ac1737d add test 2026-03-17 14:34:21 -04:00
github-actions[bot]
6725789c80 style: auto-fix ruff lint and format 2026-03-17 12:36:42 +00:00
Taylor Wilsdon
66011fd814 remove consent from reauth flow and add tests 2026-03-17 08:36:08 -04:00
Taylor Wilsdon
370bd03a69 permissions for git workflows 2026-03-17 08:28:00 -04:00
Taylor Wilsdon
aa75b3f2dd pr feedback 2026-03-10 11:45:24 -04:00
github-actions[bot]
dd547c931a style: auto-fix ruff lint and format 2026-03-09 16:20:51 +00:00
Taylor Wilsdon
ea078623b3 add 2026-03-09 12:20:04 -04:00
Taylor Wilsdon
c7b0afa74c readme cleanup 2026-03-05 08:52:48 -05:00
mickey-mikey
0e7c2a2318 refactor: move test_tasks_manage_is_valid_level to TestParsePermissionsArg
Addresses CodeRabbit Review 4 nitpick: the test validates
parse_permissions_arg() so it belongs with that test class.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 16:47:29 +11:00
mickey-mikey
acc3e665d0 fix: assert cumulative readonly scope in tasks full-level test
Addresses CodeRabbit Review 3 nitpick: verify TASKS_READONLY_SCOPE is
present at full level, confirming cumulative scope expansion.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 16:40:50 +11:00
mickey-mikey
69dd5069dc fix: add test docstrings and reset fixture per CodeRabbit review
- Add docstrings to test methods for coverage threshold
- Add autouse fixture to reset permission state between tests

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 16:29:28 +11:00
mickey-mikey
0fce7c78b6 fix: also deny clear_completed under tasks:manage
Addresses CodeRabbit review — clear_completed is destructive and should
be blocked alongside delete at the manage permission level.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 16:21:51 +11:00
mickey-mikey
377791080c feat: add tasks:manage permission level to deny delete without blocking other writes
The consolidated manage_task tool bundles create/update/delete/move into a
single tool, making it impossible to deny just the delete action via tool
tiers or scope-based filtering.

This adds:
- A `manage` permission level for tasks (between readonly and full)
- A SERVICE_DENIED_ACTIONS registry mapping (service, level) to denied actions
- An is_action_denied() helper that tools call before executing actions
- Guards in manage_task and manage_task_list that reject denied actions

Usage: --permissions tasks:manage
Allows create, update, move. Denies delete.
tasks:full remains unchanged (all actions allowed).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 15:04:31 +11:00
github-actions[bot]
95120d6f26 style: auto-fix ruff lint and format 2026-03-03 15:12:33 +00:00
Taylor Wilsdon
e999982848 cache test 2026-03-01 18:21:23 -05:00
Taylor Wilsdon
662383b8b2 Merge branch 'main' of https://github.com/taylorwilsdon/google_workspace_mcp into fix/pkce-code-verifier 2026-03-01 17:34:12 -05:00
Taylor Wilsdon
8463e4fd29 auth test 2026-03-01 17:34:11 -05:00
Taylor Wilsdon
5e4db385d3 refac 2026-03-01 12:50:40 -05:00
Taylor Wilsdon
df9640b321 Add Google Docs checklist/checkbox recognition in markdown output
Detect checklist items in Google Docs API responses and render them as
- [ ] (unchecked) and - [x] (checked) in markdown, so LLMs understand
checkbox state instead of writing literal [x] or DONE text.

Closes #516

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 09:30:05 -05:00
Taylor Wilsdon
6c04e4f5a0 refac 2026-02-28 18:05:59 -04:00
Taylor Wilsdon
44205b66e0 merge conflicts 2026-02-28 17:53:39 -04:00
Taylor Wilsdon
f29f16e591 refac 2026-02-28 17:43:44 -04:00
Taylor Wilsdon
3e175c9998 Merge branch 'main' of https://github.com/taylorwilsdon/google_workspace_mcp into drive_files_pagination_fix 2026-02-28 17:13:30 -04:00
Taylor Wilsdon
bbdd61d08d fix attachments + test 2026-02-28 17:12:30 -04:00
Taylor Wilsdon
252aa2aede tests 2026-02-28 16:56:30 -04:00
Taylor Wilsdon
edf9e94829 cachebusting for oauth endpoints, more tests, startup check for perms 2026-02-28 11:40:29 -04:00
Taylor Wilsdon
608772497d Merge branch 'main' of https://github.com/taylorwilsdon/google_workspace_mcp into issues/503 2026-02-27 16:52:53 -04:00
Taylor Wilsdon
3d3932c562 Merge branch 'main' into drive_files_pagination_fix 2026-02-27 13:20:35 -04:00
Francisco
1fab9a82fe gdrive - Moving nextPageToken to the end 2026-02-27 11:21:18 +13:00
Francisco
351afa4331 Optional hidden details in drive search and list 2026-02-26 22:53:40 +13:00
Francisco
35994ce1c5 Gdrive file type fileter - Fixing problems detected by coderabbitai 2026-02-26 13:03:19 +13:00
Francisco
117c6af88b Adding nextPageToken for pagination in drive tools 2026-02-26 12:46:51 +13:00
Francisco
5aafffe091 Test for search with file type 2026-02-25 21:42:09 +13:00
Taylor Wilsdon
aa520b72d3 fix all them tests 2026-02-24 21:09:14 -04:00
Taylor Wilsdon
0b0890a2e8 Merge branch 'main' of https://github.com/taylorwilsdon/google_workspace_mcp 2026-02-24 11:24:25 -04:00
github-actions[bot]
3f9821b525 style: auto-fix ruff lint and format 2026-02-24 14:29:22 +00:00
Taylor Wilsdon
f38dbc48a9 Merge branch 'fastmcp_v3' of https://github.com/taylorwilsdon/google_workspace_mcp into fastmcp_v3 2026-02-24 10:29:04 -04:00
github-actions[bot]
c454cc9630 style: auto-fix ruff lint and format 2026-02-24 14:27:22 +00:00
Taylor Wilsdon
1e3dab2121 merge 2026-02-24 10:11:00 -04:00
mickey-mikey
ffeba1f2f3 fix: add O_BINARY flag to os.open for Windows attachment writes
Fixes #494 - Windows attachment corruption for PNG/PDF files.

On Windows, os.open() defaults to text mode, which translates LF (0x0a)
bytes to CRLF (0x0d 0x0a) during os.write(). This corrupts any binary
attachment containing 0x0a bytes (PNG headers, PDFs, etc.).

The fix adds os.O_BINARY to the os.open() flags using the standard
getattr(os, 'O_BINARY', 0) idiom, which returns the flag on Windows
and 0 (no-op) on platforms where it doesn't exist.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 11:45:37 +11:00
Taylor Wilsdon
4f5c65953c Merge branch 'main' of github.com:taylorwilsdon/google_workspace_mcp into feature/create-drive-folder 2026-02-19 09:55:07 -05:00
Taylor Wilsdon
7d5c0fdbca ruff & mimetype 2026-02-19 09:42:42 -05:00
Taylor Wilsdon
eaa13d3f7e Merge branch 'main' of github.com:taylorwilsdon/google_workspace_mcp into feat/chat-attachment-download 2026-02-19 09:41:06 -05:00
Taylor Wilsdon
6f2a88c105 Merge pull request #489 from MaxGhenis/feat/comment-anchor-text
feat: surface quotedFileContent (anchor text) in comment reading
2026-02-19 09:39:56 -05:00
Max Ghenis
08ad7ad308 feat(docs): add get_doc_as_markdown tool with comment context
Adds a new `get_doc_as_markdown` tool that converts Google Docs to clean
Markdown preserving formatting (headings, bold/italic/strikethrough, links,
code spans, ordered/unordered lists with nesting, and tables).

Optionally overlays comments with their anchor text (quotedFileContent) —
the specific text each comment is attached to — in two modes:
- inline: footnote-style references placed at the anchor text location
- appendix: all comments grouped at the bottom with blockquoted anchors

This gives AI agents full document context in a single tool call, unlike
get_doc_content which strips all formatting to plain text.

New files:
- gdocs/docs_markdown.py: Converter + comment formatting logic
- tests/gdocs/test_docs_markdown.py: 18 tests

Tool tier: extended (alongside search_docs, export_doc_to_pdf, etc.)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 19:15:56 -08:00
Max Ghenis
d4070a209b feat: surface quotedFileContent (anchor text) in comment reading
When reading comments via read_document_comments / read_spreadsheet_comments /
read_presentation_comments, the Drive API's quotedFileContent.value field is
now requested and displayed as "Quoted text:" in the output. This shows which
specific text in the document each comment is anchored to.

Comments without anchor text (document-level comments) omit the line.

Relates to #210

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 19:12:21 -08:00
Drew Gillson
4f3eec459d Add chat attachment support: surface metadata and download images/files
Previously, get_messages and search_messages completely ignored the
attachment field on Chat API messages. This adds:

- Attachment metadata (filename, type) displayed inline in get_messages
  and search_messages output
- New download_chat_attachment tool that downloads attachments via the
  Chat API media endpoint and saves to local disk

The download uses httpx with a Bearer token against the
chat.googleapis.com/v1/media endpoint (with alt=media), which works
correctly in both OAuth 2.0 and OAuth 2.1 modes. The attachment's
downloadUri field is intentionally ignored as it points to
chat.google.com which requires browser session cookies.

Key details:
- Uses attachmentDataRef.resourceName for the media endpoint URL
- No new OAuth scopes required (existing chat_read is sufficient)
- Tool registered in the extended tier
- 10 unit tests covering metadata display, download, and edge cases
2026-02-18 17:02:18 -07:00
github-actions[bot]
950206c707 style: auto-fix ruff lint and format 2026-02-18 16:49:48 +00:00
Taylor Wilsdon
a28fa0a249 address issues/483 2026-02-18 11:48:53 -05:00
Taylor Wilsdon
935fb29398 ruff 2026-02-14 12:16:25 -05:00