Google
Use this skill when Kate needs to read or act on the user's Google
services: email, calendar, tasks, and Drive files.
The google extension implements REST API calls; OAuth refresh tokens
are handled via environment variables.
Use when
- Read, search, or summarize emails
- List/create/update calendar events
- Query or add Tasks items
- List/download/upload Drive files
Do not use when
- You want write actions without the corresponding operator write flag
enabled — the tool returns
-32043
- You want a full Google API catalog — this extension covers only
Gmail/Calendar/Tasks/Drive
Tool surface
21 tools grouped by service. Reads are unrestricted; writes are gated.
Status
status — credential presence, endpoints, write-flag state
Gmail (5 tools)
gmail_list(query?, label_ids?, max_results?, include_spam_trash?, page_token?) — metadata (id + thread_id)
gmail_read(id, format?) — full message (headers, decoded body_text, labels)
gmail_search(query, max_results?) — list alias with required query
gmail_send(to, subject, body) — requires GOOGLE_ALLOW_SEND=true
gmail_modify_labels(id, add_labels?, remove_labels?) — gated (mark_read, archive, trash)
Calendar (5 tools)
calendar_list_calendars
calendar_list_events(calendar_id?, time_min?, time_max?, q?, max_results?, single_events?, order_by?)
calendar_create_event(calendar_id?, summary, description?, location?, start, end, time_zone?, attendees?) — requires GOOGLE_ALLOW_CALENDAR_WRITE=true
calendar_update_event(calendar_id?, event_id, patch) — gated
calendar_delete_event(calendar_id?, event_id) — gated
Tasks (5 tools)
tasks_list_lists(max_results?)
tasks_list_tasks(list_id, show_completed?, show_hidden?, max_results?)
tasks_add(list_id, title, notes?, due?) — requires GOOGLE_ALLOW_TASKS_WRITE=true
tasks_complete(list_id, task_id) — gated
tasks_delete(list_id, task_id) — gated
Drive (6 tools)
drive_list(q?, page_size?, fields?, page_token?, spaces?)
drive_get(id, fields?)
drive_download(id, output_path) — writes to disk; output_path must be under GOOGLE_DRIVE_SANDBOX_ROOT
drive_upload(source_path, name?, parent_id?, mime_type?) — requires GOOGLE_ALLOW_DRIVE_WRITE=true; source path must be under sandbox
drive_create_folder(name, parent_id?) — gated
drive_delete(id) — gated
Execution guidance
Read email
gmail_search query:"is:unread newer_than:1d" max_results:10 → ids
gmail_read id:<id> for each relevant message → body_text + headers
- Optional:
gmail_modify_labels to mark as read (gated)
Daily summary
calendar_list_events time_min:<today 00:00Z> time_max:<tomorrow 00:00Z> → agenda
tasks_list_tasks list_id:@default show_completed:false → pending tasks
gmail_search query:"is:unread" → urgent inbox
Process a Drive PDF
drive_list q:"mimeType='application/pdf' and name contains 'factura'" → id
drive_download id:<id> output_path:/sandbox/factura.pdf → local
pdf-extract.extract_text path:/sandbox/factura.pdf → text
summarize.summarize_text text:<...> → summary
Anti-patterns
- Do not expose full email body_text to end users if it contains
third-party PII; quote only relevant excerpts.
- Do not loop
tasks_add without confirmation; each call persists a row.
- Do not download files that exceed memory limits (hard cap ~50 MB in
blocking reqwest body); use storage flow for larger payloads.
Required OAuth scopes
GOOGLE_REFRESH_TOKEN must be generated with the required scopes.
Recommended setup (full usage):
https://www.googleapis.com/auth/gmail.readonly
https://www.googleapis.com/auth/gmail.send
https://www.googleapis.com/auth/gmail.modify
https://www.googleapis.com/auth/calendar.readonly
https://www.googleapis.com/auth/calendar.events
https://www.googleapis.com/auth/tasks
https://www.googleapis.com/auth/drive
If your token has read-only scopes, write tools may pass local gating
but Google returns 403 insufficient permissions, surfaced as
-32012 Forbidden.
Errors
| Code |
Meaning |
| -32011 |
unauthorized / refresh failed / missing scope for read calls |
| -32012 |
forbidden (missing scope for write calls) |
| -32001 |
not found (invalid id) |
| -32013 |
rate limited (with retry_after_secs) |
| -32043 |
write denied — set the required write flag |
| -32602 |
bad input (path outside sandbox, malformed URL, invalid enum) |
| -32003 / -32005 / -32004 |
transport / timeout / circuit open |
1---
2name: google
3description: Gmail, Calendar, Tasks, Drive, Contacts (People), and Photos via Google APIs with OAuth refresh tokens.
4requires:
5 bins: []
6 env:
7 - GOOGLE_CLIENT_ID
8 - GOOGLE_CLIENT_SECRET
9 - GOOGLE_REFRESH_TOKEN
10metadata:
11 source: https://skillmd.com/skills/aibot88/google
12---
13
14# Google
15
16Use this skill when Kate needs to read or act on the user's Google
17services: email, calendar, tasks, and Drive files.
18The `google` extension implements REST API calls; OAuth refresh tokens
19are handled via environment variables.
20
21## Use when
22
23- Read, search, or summarize emails
24- List/create/update calendar events
25- Query or add Tasks items
26- List/download/upload Drive files
27
28## Do not use when
29
30- You want write actions without the corresponding operator write flag
31 enabled — the tool returns `-32043`
32- You want a full Google API catalog — this extension covers only
33 Gmail/Calendar/Tasks/Drive
34
35## Tool surface
36
37**21 tools** grouped by service. Reads are unrestricted; writes are gated.
38
39### Status
40- `status` — credential presence, endpoints, write-flag state
41
42### Gmail (5 tools)
43- `gmail_list(query?, label_ids?, max_results?, include_spam_trash?, page_token?)` — metadata (id + thread_id)
44- `gmail_read(id, format?)` — full message (headers, decoded body_text, labels)
45- `gmail_search(query, max_results?)` — `list` alias with required query
46- `gmail_send(to, subject, body)` — **requires `GOOGLE_ALLOW_SEND=true`**
47- `gmail_modify_labels(id, add_labels?, remove_labels?)` — **gated** (mark_read, archive, trash)
48
49### Calendar (5 tools)
50- `calendar_list_calendars`
51- `calendar_list_events(calendar_id?, time_min?, time_max?, q?, max_results?, single_events?, order_by?)`
52- `calendar_create_event(calendar_id?, summary, description?, location?, start, end, time_zone?, attendees?)` — **requires `GOOGLE_ALLOW_CALENDAR_WRITE=true`**
53- `calendar_update_event(calendar_id?, event_id, patch)` — **gated**
54- `calendar_delete_event(calendar_id?, event_id)` — **gated**
55
56### Tasks (5 tools)
57- `tasks_list_lists(max_results?)`
58- `tasks_list_tasks(list_id, show_completed?, show_hidden?, max_results?)`
59- `tasks_add(list_id, title, notes?, due?)` — **requires `GOOGLE_ALLOW_TASKS_WRITE=true`**
60- `tasks_complete(list_id, task_id)` — **gated**
61- `tasks_delete(list_id, task_id)` — **gated**
62
63### Drive (6 tools)
64- `drive_list(q?, page_size?, fields?, page_token?, spaces?)`
65- `drive_get(id, fields?)`
66- `drive_download(id, output_path)` — writes to disk; `output_path` must be under `GOOGLE_DRIVE_SANDBOX_ROOT`
67- `drive_upload(source_path, name?, parent_id?, mime_type?)` — **requires `GOOGLE_ALLOW_DRIVE_WRITE=true`**; source path must be under sandbox
68- `drive_create_folder(name, parent_id?)` — **gated**
69- `drive_delete(id)` — **gated**
70
71## Execution guidance
72
73### Read email
741. `gmail_search query:"is:unread newer_than:1d" max_results:10` → ids
752. `gmail_read id:<id>` for each relevant message → body_text + headers
763. Optional: `gmail_modify_labels` to mark as read (gated)
77
78### Daily summary
791. `calendar_list_events time_min:<today 00:00Z> time_max:<tomorrow 00:00Z>` → agenda
802. `tasks_list_tasks list_id:@default show_completed:false` → pending tasks
813. `gmail_search query:"is:unread"` → urgent inbox
82
83### Process a Drive PDF
841. `drive_list q:"mimeType='application/pdf' and name contains 'factura'"` → id
852. `drive_download id:<id> output_path:/sandbox/factura.pdf` → local
863. `pdf-extract.extract_text path:/sandbox/factura.pdf` → text
874. `summarize.summarize_text text:<...>` → summary
88
89### Anti-patterns
90
91- **Do not expose full email body_text** to end users if it contains
92 third-party PII; quote only relevant excerpts.
93- **Do not loop `tasks_add`** without confirmation; each call persists a row.
94- **Do not download files** that exceed memory limits (hard cap ~50 MB in
95 blocking reqwest body); use storage flow for larger payloads.
96
97## Required OAuth scopes
98
99`GOOGLE_REFRESH_TOKEN` must be generated with the required scopes.
100Recommended setup (full usage):
101
102```
103https://www.googleapis.com/auth/gmail.readonly
104https://www.googleapis.com/auth/gmail.send
105https://www.googleapis.com/auth/gmail.modify
106https://www.googleapis.com/auth/calendar.readonly
107https://www.googleapis.com/auth/calendar.events
108https://www.googleapis.com/auth/tasks
109https://www.googleapis.com/auth/drive
110```
111
112If your token has read-only scopes, write tools may pass local gating
113but Google returns `403 insufficient permissions`, surfaced as
114`-32012` Forbidden.
115
116## Errors
117
118| Code | Meaning |
119|------|----------------|
120| -32011 | unauthorized / refresh failed / missing scope for read calls |
121| -32012 | forbidden (missing scope for write calls) |
122| -32001 | not found (invalid id) |
123| -32013 | rate limited (with `retry_after_secs`) |
124| -32043 | write denied — set the required write flag |
125| -32602 | bad input (path outside sandbox, malformed URL, invalid enum) |
126| -32003 / -32005 / -32004 | transport / timeout / circuit open |