@aaronsb/google-workspace-mcp 4.0.1 → 4.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/README.md +154 -141
  2. package/build/factory/manifest/calendar.yaml +22 -22
  3. package/build/factory/manifest/docs.yaml +19 -3
  4. package/build/factory/manifest/drive.yaml +16 -16
  5. package/build/factory/manifest/gmail.yaml +18 -18
  6. package/build/factory/manifest/meet.yaml +13 -13
  7. package/build/factory/manifest/sheets.yaml +29 -29
  8. package/build/factory/manifest/tasks.yaml +14 -14
  9. package/build/index.js +13 -9
  10. package/build/index.js.map +1 -1
  11. package/build/lifecycle.d.ts +35 -0
  12. package/build/lifecycle.js +159 -0
  13. package/build/lifecycle.js.map +1 -0
  14. package/build/server/formatting/markdown.d.ts +2 -0
  15. package/build/server/formatting/markdown.js +1 -1
  16. package/build/server/formatting/markdown.js.map +1 -1
  17. package/build/server/handlers/validate.d.ts +6 -0
  18. package/build/server/handlers/validate.js +11 -0
  19. package/build/server/handlers/validate.js.map +1 -1
  20. package/build/server/scratchpad/adapters/import-doc.js +28 -3
  21. package/build/server/scratchpad/adapters/import-doc.js.map +1 -1
  22. package/build/server/scratchpad/docs-sync.d.ts +15 -3
  23. package/build/server/scratchpad/docs-sync.js +114 -45
  24. package/build/server/scratchpad/docs-sync.js.map +1 -1
  25. package/build/server/scratchpad/handler.js +5 -0
  26. package/build/server/scratchpad/handler.js.map +1 -1
  27. package/build/services/calendar/patch.js +62 -8
  28. package/build/services/calendar/patch.js.map +1 -1
  29. package/build/services/docs/patch.js +321 -16
  30. package/build/services/docs/patch.js.map +1 -1
  31. package/build/version.d.ts +1 -1
  32. package/build/version.js +1 -1
  33. package/package.json +1 -1
package/README.md CHANGED
@@ -5,170 +5,198 @@
5
5
  [![Node](https://img.shields.io/node/v/@aaronsb/google-workspace-mcp?logo=node.js&label=node)](https://nodejs.org)
6
6
  [![License](https://img.shields.io/github/license/aaronsb/google-workspace-mcp)](LICENSE)
7
7
 
8
- Give AI agents real access to Google Workspace — Gmail, Calendar, Drive, Docs, Sheets, Tasks, and Meet — through a single MCP server that handles multi-account credential routing, response shaping for AI consumption, and contextual next-step guidance.
8
+ **Give your AI agent real access to Google Workspace** — Gmail, Calendar, Drive, Docs, Sheets, Tasks and Meet — from one MCP server, across as many accounts as you have.
9
9
 
10
- The server talks to Google's REST APIs directly, through a client it builds **from Google's own machine-readable API specifications**. Google publishes a [Discovery document](https://developers.google.com/discovery) for every API; a build step reads them and generates the descriptor this server dispatches against. Google's API surface *is* the source of truth — not a hand-maintained wrapper, and not a third-party CLI.
10
+ Search your mail, check your calendar, write a doc, file a task — in conversation, as yourself.
11
11
 
12
- ## Why This MCP Server
12
+ ## Install
13
13
 
14
- **For users:** One install gives your agent authenticated access to your Google accounts. Search email, check your calendar, manage Drive files, chain multi-step workflows — through natural conversation.
14
+ First, you need **Google OAuth credentials** — the one prerequisite common to every path:
15
15
 
16
- **For teams:** Multi-account support lets one agent work across personal and work accounts at once, with per-account credential isolation and XDG-compliant storage.
16
+ 1. Go to [console.cloud.google.com/apis/credentials](https://console.cloud.google.com/apis/credentials)
17
+ 2. Create an **OAuth 2.0 Client ID**, application type **Desktop app**
18
+ 3. Enable the APIs you want (Gmail, Calendar, Drive, Sheets, Docs, Tasks, Meet)
19
+ 4. Keep the **Client ID** and **Client Secret** handy — you'll paste them in below
17
20
 
18
- **For developers:** Adding an operation is a YAML edit, not a code change. The manifest curates which of Google's methods to expose; the generated descriptor already knows every method's path, HTTP verb, parameters, and scopes. Nothing is transcribed by hand, so nothing drifts from Google.
21
+ Then pick the path that matches how you work. All three run the same server.
19
22
 
20
- ## What's Available
23
+ Node 22.12 or newer. (Node 18 and 20 are both end-of-life.)
21
24
 
22
- **11 tools — 7 Google services (80 operations), plus accounts, batching, content authoring, and a file sandbox.**
25
+ ---
23
26
 
24
- | Tool | What It Does |
25
- |------|--------------|
26
- | `manage_email` | Gmail — search, read (plain or sanitized HTML), send, reply / reply-all, forward, triage, trash, labels, threads, attachments |
27
- | `manage_calendar` | Calendar — list, agenda, get, create, quickAdd (natural language), update, delete, calendars, freebusy |
28
- | `manage_drive` | Drive — search, get, upload, download, copy, rename / move, delete, export, permissions, comments, view images |
29
- | `manage_sheets` | Sheets — read / write ranges (row-numbered output), append, clear, manage tabs, copy / duplicate / rename |
30
- | `manage_docs` | Docs — get, create, append, insert text, find-and-replace |
31
- | `manage_tasks` | Tasks — list / create / update / complete tasks and task lists |
32
- | `manage_meet` | Meet — browse past conferences, participants, transcripts, recordings, smart notes |
33
- | `manage_accounts` | Multi-account lifecycle — add accounts, manage credentials and scopes |
34
- | `manage_scratchpad` | Compose / edit multi-line content (line- or JSON-path-addressed), attach files, send to any target; JSON mode live-syncs to Docs / Sheets |
35
- | `manage_workspace` | File operations in the workspace sandbox (exchange point for attachments, downloads, exports) |
36
- | `queue_operations` | Chain operations sequentially with `$N.field` result references |
27
+ ### 📦 → 🤖 Claude Desktop — one-click `.mcpb` install (recommended)
37
28
 
38
- Every response carries **next-steps** guidance, so the agent always knows what it can do next.
29
+ Download **`google-workspace-mcp.mcpb`** from the [latest release](https://github.com/aaronsb/google-workspace-mcp/releases/latest), then **drag it onto the Claude Desktop window**, or double-click it.
39
30
 
40
- Those 80 operations reach 60 of the 233 methods Google publishes across these seven APIs.
31
+ Claude Desktop opens an install dialog with three fields:
41
32
 
42
- **Missing something you need?** The rest of the surface is mapped, not guessed. **[Browse every method Google publishes](docs/api-surface.md)** — what it does, whether we expose it, and a one-click link to request it. The descriptions are Google's own, and the page is generated from the same specification the client is built from, so it can't drift.
33
+ | Field | |
34
+ |---|---|
35
+ | **Google OAuth Client ID** | required — from the step above |
36
+ | **Google OAuth Client Secret** | required — from the step above |
37
+ | **Workspace Directory** | optional — where attachments, downloads and exports land. Defaults to `~/.local/share/google-workspace-mcp/workspace/`. Give it a dedicated folder — not your home, Documents, Desktop, or a Google Drive folder. |
43
38
 
44
- The subset is curated on purpose: an agent has to *choose* among these, and every method it must weigh is one it can pick wrongly. But that judgement was made without you — if it's wrong for your case, **[say so](docs/coverage.md)**. A good request names the task, not the method.
39
+ Paste, hit Save, done. No JSON to edit, no Node to install, no paths to get right — the bundle carries the server and every dependency.
45
40
 
46
- ## How It Works
41
+ **One bundle covers every platform** — macOS (Intel and Apple Silicon), Linux (x64 and ARM64), and Windows. There is nothing to choose: the server is pure JavaScript, so there is no platform-specific payload to pick between.
47
42
 
48
- Two phases. Google's API specification is acquired at **build time** and frozen into a committed artifact; at **runtime** the server only reads it.
43
+ > *Cross-platform note:* `.mcpb` files install via Claude Desktop's bundled handler. If double-clicking doesn't trigger Claude on your system, drag the file onto the Claude Desktop window instead, or right-click → "Open with…" and pick Claude Desktop (then "always open with" if your OS offers). Behavior varies: macOS usually auto-associates, Windows may need a one-time association, Linux varies by desktop environment.
49
44
 
50
- ### Build time — acquire the specification
45
+ ---
51
46
 
52
- ```mermaid
53
- flowchart LR
54
- disco["Google Discovery<br>documents"] --> gen["descriptor generator<br>generate-descriptor.mjs"]
55
- gen --> desc[("src/google/descriptor.json<br>233 methods · committed<br>paths · verbs · params · scopes")]
56
- desc --> gate{{"CI drift gate<br>regenerate and compare"}}
47
+ ### Claude Code — one command
57
48
 
58
- classDef external fill:#f6821f,color:#1a1a1a,stroke:#d97706
59
- classDef process fill:#2d7d9a,color:#ffffff,stroke:#4a5568
60
- classDef artifact fill:#2d8e5e,color:#ffffff,stroke:#4a5568
61
- classDef guard fill:#fbbf24,color:#1a1a1a,stroke:#d97706
62
- class disco external
63
- class gen process
64
- class desc artifact
65
- class gate guard
49
+ ```bash
50
+ claude mcp add google-workspace \
51
+ -e GOOGLE_CLIENT_ID=your-client-id \
52
+ -e GOOGLE_CLIENT_SECRET=your-client-secret \
53
+ -- npx -y @aaronsb/google-workspace-mcp
66
54
  ```
67
55
 
68
- ### Runtime — dispatch against it
56
+ That's it — no file to edit. Verify with `/mcp`.
57
+
58
+ ---
59
+
60
+ ### Other MCP clients
61
+
62
+ Add an entry to the client's MCP config file (for Claude Desktop by hand, that's `claude_desktop_config.json`; for Claude Code, `.mcp.json`):
63
+
64
+ ```json
65
+ {
66
+ "mcpServers": {
67
+ "google-workspace": {
68
+ "command": "npx",
69
+ "args": ["-y", "@aaronsb/google-workspace-mcp"],
70
+ "env": {
71
+ "GOOGLE_CLIENT_ID": "your-client-id",
72
+ "GOOGLE_CLIENT_SECRET": "your-client-secret"
73
+ }
74
+ }
75
+ }
76
+ }
77
+ ```
78
+
79
+ Or install it globally and point at the binary directly:
80
+
81
+ ```bash
82
+ npm install -g @aaronsb/google-workspace-mcp
83
+ ```
84
+
85
+ ## How it fits together
69
86
 
70
87
  ```mermaid
71
88
  flowchart LR
72
- mcp["MCP client"] -->|stdio| factory["factory generator<br>schemas + handlers"]
73
- manifest["manifest/*.yaml<br>which ops to expose"] --> factory
74
- factory --> patches["patches<br>Gmail hydration · agenda merge · MIME"]
75
- patches --> client["Google API client<br>+ account router"]
76
- desc[("descriptor.json")] -. read at startup .-> client
77
- client --> google["Google REST APIs"]
78
-
89
+ human["🧑 You<br>ask in plain language"]
90
+ agent["🤖 Your AI agent<br>Claude Desktop, Claude Code…"]
91
+ server["⚙️ This MCP server<br>picks the right account,<br>builds the real request"]
92
+ keys[("🔑 Your accounts<br>OAuth tokens, kept<br>on your own machine")]
93
+ google["☁️ Google<br>Gmail · Calendar · Drive<br>Docs · Sheets · Tasks · Meet"]
94
+
95
+ human -->|"“what's on my calendar?”"| agent
96
+ agent -->|"tool call"| server
97
+ server <-->|"which account?"| keys
98
+ server -->|"real API call, as you"| google
99
+ google -->|"your data"| server
100
+ server -->|"shaped for an agent<br>+ what to do next"| agent
101
+ agent -->|"an answer"| human
102
+
103
+ classDef person fill:#475569,color:#ffffff,stroke:#94a3b8
104
+ classDef robot fill:#2d7d9a,color:#ffffff,stroke:#4a5568
105
+ classDef ours fill:#7c3aed,color:#ffffff,stroke:#8b5cf6
106
+ classDef secrets fill:#2d8e5e,color:#ffffff,stroke:#4a5568
79
107
  classDef external fill:#f6821f,color:#1a1a1a,stroke:#d97706
80
- classDef artifact fill:#2d8e5e,color:#ffffff,stroke:#4a5568
81
- classDef config fill:#fbbf24,color:#1a1a1a,stroke:#d97706
82
- classDef core fill:#7c3aed,color:#ffffff,stroke:#8b5cf6
83
- classDef inert fill:#475569,color:#ffffff,stroke:#94a3b8
108
+
109
+ class human person
110
+ class agent robot
111
+ class server ours
112
+ class keys secrets
84
113
  class google external
85
- class desc artifact
86
- class manifest config
87
- class factory,patches,client core
88
- class mcp inert
89
114
  ```
90
115
 
91
- **The descriptor** is generated from Google's Discovery documents and committed. A CI drift gate re-generates it and fails if the result differs, so the spec we dispatch against cannot silently fall behind Google.
116
+ **Your credentials never leave your machine.** The server holds an OAuth token per account, on your own disk, and calls Google *as you* — there is no middleman service, no account of ours, nothing to sign up for. Add as many accounts as you like (personal and work, side by side); the server routes each request to the right one.
92
117
 
93
- **The client** (`src/google/client.ts`) is deliberately opinion-free: it builds the request Google's spec describes and returns exactly what Google returned. It does not reshape responses. All interpretation lives in patches and formatters, aimed at the MCP contract — which is what keeps "what Google said" and "what we chose to show" separable.
118
+ ## What it can do
94
119
 
95
- **The factory** reads the YAML manifest and generates MCP tool schemas and handlers at startup. **Patches** add behavior where an agent needs more than a raw API response — hydrating Gmail search results with senders and subjects, merging an agenda across calendars, building MIME for outbound mail. Operations without a patch get sensible defaults.
120
+ **11 tools across 7 Google services**, plus multi-account handling, batching, content authoring, and a file sandbox.
96
121
 
97
- Because method names are generated into a TypeScript union, calling a method Google doesn't publish is a **compile error**, not a 404 at runtime.
122
+ | Tool | What It Does |
123
+ |------|--------------|
124
+ | `manage_email` | Gmail — search, read (plain or sanitized HTML), send, reply / reply-all, forward, triage, trash, labels, threads, attachments |
125
+ | `manage_calendar` | Calendar — list, agenda, get, create, quickAdd (natural language), update, delete, calendars, freebusy |
126
+ | `manage_drive` | Drive — search, get, upload, download, copy, rename / move, delete, export, permissions, comments, view images |
127
+ | `manage_sheets` | Sheets — read / write ranges (row-numbered output), append, clear, manage tabs, copy / duplicate / rename |
128
+ | `manage_docs` | Docs — get, create, append, insert text, find-and-replace |
129
+ | `manage_tasks` | Tasks — list / create / update / complete tasks and task lists |
130
+ | `manage_meet` | Meet — browse past conferences, participants, transcripts, recordings, smart notes |
131
+ | `manage_accounts` | Multi-account lifecycle — add accounts, manage credentials and scopes |
132
+ | `manage_scratchpad` | Compose / edit multi-line content (line- or JSON-path-addressed), attach files, send to any target; JSON mode live-syncs to Docs / Sheets |
133
+ | `manage_workspace` | File operations in the workspace sandbox (exchange point for attachments, downloads, exports) |
134
+ | `queue_operations` | Chain operations sequentially with `$N.field` result references |
98
135
 
99
- ## Install
136
+ Every response carries **next-steps** guidance, so the agent always knows what it can do next.
100
137
 
101
- ### MCPB Bundle (Claude Desktop and other MCP clients)
138
+ ## One ask, many steps
102
139
 
103
- Download `google-workspace-mcp.mcpb` from the [latest release](https://github.com/aaronsb/google-workspace-mcp/releases).
140
+ The useful part isn't any single operation — it's that your agent can **string them together**.
104
141
 
105
- One bundle covers every platform — macOS (Intel and Apple Silicon), Linux (x64 and ARM64), and Windows. There is nothing to choose: the server is pure JavaScript on Node, so there is no platform-specific payload to pick between. It needs Node 22.12 or newer.
142
+ You ask for one thing. The agent works out that it needs four API calls, in order, each one feeding the next:
106
143
 
107
- In Claude Desktop, drag the `.mcpb` file into the app — it will prompt for your Google OAuth credentials. Other MCP clients that support `.mcpb` extensions install it the same way. The bundle includes the server and all of its dependencies.
144
+ ```mermaid
145
+ sequenceDiagram
146
+ autonumber
147
+ participant H as 🧑 You
148
+ participant A as 🤖 Your agent
149
+ participant S as ⚙️ MCP server
150
+ participant G as ☁️ Google
151
+
152
+ H->>A: "file the invoice from Acme<br>and remind me to pay it Friday"
153
+ A->>S: find the email
154
+ S->>G: search Gmail
155
+ G-->>S: the message
156
+ S-->>A: found it — and here's what you can do next
157
+ A->>S: save the attachment
158
+ S->>G: download it
159
+ A->>S: put it in Drive
160
+ S->>G: upload
161
+ A->>S: create a task, due Friday
162
+ S->>G: Google Tasks
163
+ A-->>H: Done. Invoice filed, task set for Friday.
164
+ ```
108
165
 
109
- ### Claude Code / npm
166
+ Two things make this work. Every response tells the agent **what it can do next**, so it isn't guessing at the next step. And `queue_operations` lets it run a whole chain in **one call**, feeding each result into the next — so "find the invoice, file it, remind me" is a single round trip rather than four.
110
167
 
111
- ```bash
112
- npm install @aaronsb/google-workspace-mcp
113
- ```
168
+ ## Ask for what's missing
114
169
 
115
- Or run directly:
170
+ This server exposes **80 operations**, reaching 60 of the **233 methods** Google publishes across those seven APIs. It is a curated subset on purpose: an agent has to *choose* among these, and every method it must weigh is one it can pick wrongly. A tool with 233 operations isn't more capable than one with 80 — it's harder to use correctly.
116
171
 
117
- ```bash
118
- npx @aaronsb/google-workspace-mcp
119
- ```
172
+ But that judgement was made without you.
120
173
 
121
- ### Prerequisites
174
+ **→ [Browse every method Google publishes](docs/api-surface.md)**
122
175
 
123
- 1. **Node.js** 22.12 or newer — Node 18 and 20 are both end-of-life.
124
- 2. **Google Cloud OAuth credentials** — create at [console.cloud.google.com/apis/credentials](https://console.cloud.google.com/apis/credentials):
125
- - Create an OAuth 2.0 Client ID (Desktop application)
126
- - Enable the APIs you want (Gmail, Calendar, Drive, Sheets, …)
127
- 3. Set environment variables:
128
- ```bash
129
- export GOOGLE_CLIENT_ID="your-client-id"
130
- export GOOGLE_CLIENT_SECRET="your-client-secret"
131
- ```
176
+ Every method is listed — what it does, whether we expose it, and a **Request** link that opens a pre-filled issue. The descriptions are Google's own, quoted verbatim, and the page is generated from the same specification the client is built from, so it can't drift from reality.
132
177
 
133
- ## MCP Client Configuration
178
+ That page also lists **four whole APIs this server doesn't touch yet** — Chat, Contacts, Slides and Forms — for the same reason: *not targeted* is a decision, not a fact of nature.
134
179
 
135
- ### Claude Desktop
180
+ A good request **names the task, not the method**:
136
181
 
137
- Add to `claude_desktop_config.json`:
182
+ > *"I want the agent to file incoming invoices into a folder automatically."*
138
183
 
139
- ```json
140
- {
141
- "mcpServers": {
142
- "google-workspace": {
143
- "command": "npx",
144
- "args": ["@aaronsb/google-workspace-mcp"],
145
- "env": {
146
- "GOOGLE_CLIENT_ID": "your-client-id",
147
- "GOOGLE_CLIENT_SECRET": "your-client-secret"
148
- }
149
- }
150
- }
151
- }
152
- ```
184
+ That can be evaluated. It might turn out an existing operation already does it, or that the right answer is a different method than the one you found. *"Expose `users.settings.filters.create`"* is a conclusion, not a case — lead with the problem and let the method follow.
153
185
 
154
- ### Claude Code
186
+ ## Why Apache 2.0, and not open core
155
187
 
156
- Add to `.mcp.json`:
188
+ **Everything is here.** There is no paid tier, no "enterprise" build, no feature held back to sell you later. What you install is what exists.
157
189
 
158
- ```json
159
- {
160
- "mcpServers": {
161
- "google-workspace": {
162
- "command": "npx",
163
- "args": ["@aaronsb/google-workspace-mcp"],
164
- "env": {
165
- "GOOGLE_CLIENT_ID": "your-client-id",
166
- "GOOGLE_CLIENT_SECRET": "your-client-secret"
167
- }
168
- }
169
- }
170
- }
171
- ```
190
+ Open core works by keeping the good part back. The free thing is a lead magnet, and the moment your use gets serious you discover the operation you need lives behind a licence. That model would be especially rotten *here*: this is a piece of plumbing between you and **your own data**, using **your own Google credentials**, running on **your own machine**. Nothing about that arrangement should have a paywall in the middle of it, and nothing about it needs a vendor.
191
+
192
+ [Apache 2.0](LICENSE) rather than MIT for two concrete reasons:
193
+
194
+ - **An explicit patent grant.** Contributors licence their patent claims along with their code, so using this can't become a patent problem later. MIT is silent on patents, which means the question is merely unanswered rather than settled.
195
+ - **It's safe to adopt at work.** Apache 2.0 is on essentially every corporate allow-list. Fork it, vendor it, ship it inside a commercial product — you don't owe anyone anything, and you don't need to ask.
196
+
197
+ The one obligation is attribution: keep the notices ([`NOTICE`](NOTICE), [`LICENSE`](LICENSE)) with the code. That's it.
198
+
199
+ Through v3.0.0 this project was MIT-licensed, and that history is preserved rather than erased — MIT-era contributions keep their original notice in [`LICENSE-MIT`](LICENSE-MIT), and their authors are credited in [`NOTICE`](NOTICE). Apache 2.0 takes back nothing MIT permitted.
172
200
 
173
201
  ## Usage
174
202
 
@@ -199,20 +227,7 @@ Chain operations with result references — the output of one step feeds the nex
199
227
  }
200
228
  ```
201
229
 
202
- ## Expanding Coverage
203
-
204
- The coverage mapper diffs what the manifest exposes against what Google actually publishes, so the frontier is always measured rather than estimated:
205
-
206
- ```bash
207
- npm run generate-descriptor # re-read Google's Discovery documents
208
- make coverage # what we expose vs. what Google offers
209
- make manifest-lint # validate the curated manifest
210
- make check # type-check, lint, test, build, smoke
211
- ```
212
-
213
- To expose a new operation, add it to the relevant `src/factory/manifest/*.yaml`. The descriptor already knows its path, verb, parameters, and scopes, and the factory generates the tool schema and handler. New operations get default formatting automatically — add a patch only when an agent needs a shaped response rather than a raw one.
214
-
215
- ## Data Storage
230
+ ## Where your data lives
216
231
 
217
232
  Follows the XDG Base Directory Specification:
218
233
 
@@ -224,19 +239,17 @@ Follows the XDG Base Directory Specification:
224
239
 
225
240
  Credentials are per-account files holding standard OAuth tokens. No secrets are stored in the project directory.
226
241
 
227
- ## Design
242
+ ## Under the hood
228
243
 
229
- The server generates its API client from Google's own Discovery documents and calls Google directly. Nothing sits between the server and the API it targets: there is no subprocess, no second response shape, and no unversioned wrapper to keep in step. The descriptor is regenerated and diffed against Google on every build, so a method that does not exist is a compile error rather than a runtime surprise.
244
+ You don't need any of this to use the server. But if you're curious, or you want to add an operation:
230
245
 
231
- On top of that sits the manifest-driven tool factory: adding an operation is a YAML edit, not a code change. The coverage mapper reads Google's real published surface, so "what we expose vs what exists" is a measured number.
246
+ The server builds its Google API client **from Google's own machine-readable API specifications**. Nothing is transcribed by hand, so the surface can't drift from reality, and adding an operation is a YAML edit rather than a code change.
232
247
 
233
- The reasoning behind this design, including what was verified and what it cost, is in **[ADR-103](docs/architecture/core/ADR-103-generate-a-google-api-descriptor-retire-the-gws-facade.md)**.
248
+ - **[How it works](docs/how-it-works.md)** — the build-time / runtime split, the descriptor, the factory
249
+ - **[API coverage](docs/coverage.md)** — what's exposed, what isn't, and how to ask for more
250
+ - **[The full API surface](docs/api-surface.md)** — every method Google publishes, plus the four APIs we don't target yet
251
+ - **[Architecture decisions](docs/architecture/)** — the ADRs, including why this server owns its Google client outright
234
252
 
235
253
  ## License
236
254
 
237
- [Apache License 2.0](LICENSE).
238
-
239
- Through v3.0.0 this project was MIT-licensed. Those contributions keep their original
240
- notice (`LICENSE-MIT`), and the contributors are credited in [`NOTICE`](NOTICE). Apache 2.0
241
- adds an explicit patent grant and a state-your-changes requirement; it does not take back
242
- anything MIT permitted.
255
+ [Apache License 2.0](LICENSE) — see [Why Apache 2.0](#why-apache-20-and-not-open-core) above.
@@ -13,10 +13,10 @@ operations:
13
13
  params:
14
14
  calendarId:
15
15
  type: string
16
- description: "Calendar ID to query (default: 'primary'). Use 'calendars' operation to list available IDs."
16
+ description: "Calendar ID. Use the `calendars` operation to list available IDs; required for events on shared calendars. Defaults to 'primary' on the event operations (`list`, `get`, `create`, `quickAdd`, `update`, `delete`). On `agenda`, a calendar name or ID to filter to — OMIT it to span all calendars, and do not pass 'primary', which is an API alias rather than an id agenda matches on. On `freebusy`, a comma-separated list of calendar IDs to check IN ADDITION to your own."
17
17
  timeMin:
18
18
  type: string
19
- description: "Start of range (ISO 8601) — defaults to today"
19
+ description: "Start of range (ISO 8601). On `list`, defaults to today."
20
20
  timeMax:
21
21
  type: string
22
22
  description: "End of range (ISO 8601)"
@@ -40,7 +40,7 @@ operations:
40
40
  params:
41
41
  calendarId:
42
42
  type: string
43
- description: "Filter to a specific calendar name or ID"
43
+ description: "Calendar ID. Use the `calendars` operation to list available IDs; required for events on shared calendars. Defaults to 'primary' on the event operations (`list`, `get`, `create`, `quickAdd`, `update`, `delete`). On `agenda`, a calendar name or ID to filter to — OMIT it to span all calendars, and do not pass 'primary', which is an API alias rather than an id agenda matches on. On `freebusy`, a comma-separated list of calendar IDs to check IN ADDITION to your own."
44
44
  days:
45
45
  type: number
46
46
  description: "Number of days ahead to show (default: today only)"
@@ -58,7 +58,7 @@ operations:
58
58
  params:
59
59
  calendarId:
60
60
  type: string
61
- description: "Calendar ID (default: 'primary'). Required for events on shared calendars."
61
+ description: "Calendar ID. Use the `calendars` operation to list available IDs; required for events on shared calendars. Defaults to 'primary' on the event operations (`list`, `get`, `create`, `quickAdd`, `update`, `delete`). On `agenda`, a calendar name or ID to filter to — OMIT it to span all calendars, and do not pass 'primary', which is an API alias rather than an id agenda matches on. On `freebusy`, a comma-separated list of calendar IDs to check IN ADDITION to your own."
62
62
  eventId:
63
63
  type: string
64
64
  description: "Event ID"
@@ -74,7 +74,7 @@ operations:
74
74
  params:
75
75
  calendarId:
76
76
  type: string
77
- description: "Calendar ID (default: 'primary')"
77
+ description: "Calendar ID. Use the `calendars` operation to list available IDs; required for events on shared calendars. Defaults to 'primary' on the event operations (`list`, `get`, `create`, `quickAdd`, `update`, `delete`). On `agenda`, a calendar name or ID to filter to — OMIT it to span all calendars, and do not pass 'primary', which is an API alias rather than an id agenda matches on. On `freebusy`, a comma-separated list of calendar IDs to check IN ADDITION to your own."
78
78
  summary:
79
79
  type: string
80
80
  description: "Event title"
@@ -95,10 +95,10 @@ operations:
95
95
  description: "Event location"
96
96
  attendees:
97
97
  type: string
98
- description: "Comma-separated attendee emails"
98
+ description: "Comma-separated email addresses. On `update`, whatever you pass REPLACES the existing list — addresses you leave out are removed, and an empty string clears everyone. OMIT the parameter to leave the attendee list untouched while changing other fields. On `freebusy`, the addresses whose availability to check."
99
99
  meet:
100
100
  type: boolean
101
- description: "Add a Google Meet video conference link to the event"
101
+ description: "Add a Google Meet video conference link. On `update`, true adds a link and false REMOVES an existing one; omit it to leave the link as it is."
102
102
 
103
103
  quickAdd:
104
104
  type: action
@@ -107,7 +107,7 @@ operations:
107
107
  params:
108
108
  calendarId:
109
109
  type: string
110
- description: "Calendar ID (default: 'primary')"
110
+ description: "Calendar ID. Use the `calendars` operation to list available IDs; required for events on shared calendars. Defaults to 'primary' on the event operations (`list`, `get`, `create`, `quickAdd`, `update`, `delete`). On `agenda`, a calendar name or ID to filter to — OMIT it to span all calendars, and do not pass 'primary', which is an API alias rather than an id agenda matches on. On `freebusy`, a comma-separated list of calendar IDs to check IN ADDITION to your own."
111
111
  text:
112
112
  type: string
113
113
  description: "Natural language event description"
@@ -122,32 +122,32 @@ operations:
122
122
  params:
123
123
  calendarId:
124
124
  type: string
125
- description: "Calendar ID (default: 'primary')"
125
+ description: "Calendar ID. Use the `calendars` operation to list available IDs; required for events on shared calendars. Defaults to 'primary' on the event operations (`list`, `get`, `create`, `quickAdd`, `update`, `delete`). On `agenda`, a calendar name or ID to filter to — OMIT it to span all calendars, and do not pass 'primary', which is an API alias rather than an id agenda matches on. On `freebusy`, a comma-separated list of calendar IDs to check IN ADDITION to your own."
126
126
  eventId:
127
127
  type: string
128
- description: "Event ID to update"
128
+ description: "Event ID"
129
129
  required: true
130
130
  summary:
131
131
  type: string
132
- description: "Updated event title"
132
+ description: "Event title"
133
133
  start:
134
134
  type: string
135
- description: "Updated start time (ISO 8601)"
135
+ description: "Start time (ISO 8601)"
136
136
  end:
137
137
  type: string
138
- description: "Updated end time (ISO 8601)"
138
+ description: "End time (ISO 8601)"
139
139
  description:
140
140
  type: string
141
- description: "Updated description"
141
+ description: "Event description or notes"
142
142
  location:
143
143
  type: string
144
- description: "Updated location"
144
+ description: "Event location"
145
145
  attendees:
146
146
  type: string
147
- description: "Comma-separated attendee emails. REPLACES the existing attendee list entirely (Google events.patch overwrites arrays). Pass an empty string to clear all attendees."
147
+ description: "Comma-separated email addresses. On `update`, whatever you pass REPLACES the existing list — addresses you leave out are removed, and an empty string clears everyone. OMIT the parameter to leave the attendee list untouched while changing other fields. On `freebusy`, the addresses whose availability to check."
148
148
  meet:
149
149
  type: boolean
150
- description: "Add a Google Meet video conference link. Note: Google Calendar does not allow removing an existing Meet link via patch; omit or set false to leave the link untouched."
150
+ description: "Add a Google Meet video conference link. On `update`, true adds a link and false REMOVES an existing one; omit it to leave the link as it is."
151
151
  defaults:
152
152
  calendarId: primary
153
153
 
@@ -158,10 +158,10 @@ operations:
158
158
  params:
159
159
  calendarId:
160
160
  type: string
161
- description: "Calendar ID (default: 'primary')"
161
+ description: "Calendar ID. Use the `calendars` operation to list available IDs; required for events on shared calendars. Defaults to 'primary' on the event operations (`list`, `get`, `create`, `quickAdd`, `update`, `delete`). On `agenda`, a calendar name or ID to filter to — OMIT it to span all calendars, and do not pass 'primary', which is an API alias rather than an id agenda matches on. On `freebusy`, a comma-separated list of calendar IDs to check IN ADDITION to your own."
162
162
  eventId:
163
163
  type: string
164
- description: "Event ID to delete"
164
+ description: "Event ID"
165
165
  required: true
166
166
  defaults:
167
167
  calendarId: primary
@@ -180,7 +180,7 @@ operations:
180
180
  params:
181
181
  timeMin:
182
182
  type: string
183
- description: "Start of range (ISO 8601)"
183
+ description: "Start of range (ISO 8601). On `list`, defaults to today."
184
184
  required: true
185
185
  timeMax:
186
186
  type: string
@@ -188,7 +188,7 @@ operations:
188
188
  required: true
189
189
  attendees:
190
190
  type: string
191
- description: "Comma-separated email addresses to check availability for"
191
+ description: "Comma-separated email addresses. On `update`, whatever you pass REPLACES the existing list — addresses you leave out are removed, and an empty string clears everyone. OMIT the parameter to leave the attendee list untouched while changing other fields. On `freebusy`, the addresses whose availability to check."
192
192
  calendarId:
193
193
  type: string
194
- description: "Comma-separated calendar IDs to check (in addition to own calendar)"
194
+ description: "Calendar ID. Use the `calendars` operation to list available IDs; required for events on shared calendars. Defaults to 'primary' on the event operations (`list`, `get`, `create`, `quickAdd`, `update`, `delete`). On `agenda`, a calendar name or ID to filter to — OMIT it to span all calendars, and do not pass 'primary', which is an API alias rather than an id agenda matches on. On `freebusy`, a comma-separated list of calendar IDs to check IN ADDITION to your own."
@@ -4,6 +4,10 @@ requires_email: true
4
4
  google_service: docs
5
5
  operations:
6
6
 
7
+ # A document's text lives per-TAB, and `tabId` is the handle that addresses one — the
8
+ # same handle every write operation below takes. Reading without it spans the document;
9
+ # reading with it scopes both the text and the character indices to one tab, so an
10
+ # index measured here means the same thing to insertText (#157, #158).
7
11
  get:
8
12
  type: detail
9
13
  description: "get document content and metadata"
@@ -13,6 +17,9 @@ operations:
13
17
  type: string
14
18
  description: "Document ID"
15
19
  required: true
20
+ tabId:
21
+ type: string
22
+ description: "Tab to act on — a tabId from a previous get's tabIndex. Scopes the read on get; targets the edit on write/insertText/replaceText, which act on the FIRST tab when it is omitted (replaceText spans every tab). Character indices are per-tab."
16
23
 
17
24
  # `title` rides in the BODY — documents.create declares no parameters at all
18
25
  # (Discovery: `"parameters": {}`), so everything goes into the Document resource.
@@ -42,8 +49,11 @@ operations:
42
49
  required: true
43
50
  text:
44
51
  type: string
45
- description: "Text to append (plain text)"
52
+ description: "Text to write (plain text) — appended to the end by write, inserted at `index` by insertText"
46
53
  required: true
54
+ tabId:
55
+ type: string
56
+ description: "Tab to act on — a tabId from a previous get's tabIndex. Scopes the read on get; targets the edit on write/insertText/replaceText, which act on the FIRST tab when it is omitted (replaceText spans every tab). Character indices are per-tab."
47
57
 
48
58
  insertText:
49
59
  type: action
@@ -56,12 +66,15 @@ operations:
56
66
  required: true
57
67
  text:
58
68
  type: string
59
- description: "Text to insert"
69
+ description: "Text to write (plain text) — appended to the end by write, inserted at `index` by insertText"
60
70
  required: true
61
71
  index:
62
72
  type: number
63
- description: "Character index to insert at (1 = start of document body)"
73
+ description: "Character index to insert at (1 = start of the tab's body)"
64
74
  required: true
75
+ tabId:
76
+ type: string
77
+ description: "Tab to act on — a tabId from a previous get's tabIndex. Scopes the read on get; targets the edit on write/insertText/replaceText, which act on the FIRST tab when it is omitted (replaceText spans every tab). Character indices are per-tab."
65
78
 
66
79
  replaceText:
67
80
  type: action
@@ -84,3 +97,6 @@ operations:
84
97
  type: boolean
85
98
  description: "Case-sensitive match (default: true)"
86
99
  default: true
100
+ tabId:
101
+ type: string
102
+ description: "Tab to act on — a tabId from a previous get's tabIndex. Scopes the read on get; targets the edit on write/insertText/replaceText, which act on the FIRST tab when it is omitted (replaceText spans every tab). Character indices are per-tab."