google-mcp-suite 1.4.1 → 1.6.0
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.
- package/README.md +14 -9
- package/dist/docs/capabilities.d.ts +3 -0
- package/dist/docs/capabilities.d.ts.map +1 -0
- package/dist/docs/capabilities.js +15 -0
- package/dist/docs/capabilities.js.map +1 -0
- package/dist/docs/entities/BatchUpdateReceipt.d.ts +14 -0
- package/dist/docs/entities/BatchUpdateReceipt.d.ts.map +1 -0
- package/dist/docs/entities/BatchUpdateReceipt.js +16 -0
- package/dist/docs/entities/BatchUpdateReceipt.js.map +1 -0
- package/dist/docs/entities/Document.d.ts +31 -0
- package/dist/docs/entities/Document.d.ts.map +1 -0
- package/dist/docs/entities/Document.js +25 -0
- package/dist/docs/entities/Document.js.map +1 -0
- package/dist/docs/entities/ParagraphStyle.d.ts +33 -0
- package/dist/docs/entities/ParagraphStyle.d.ts.map +1 -0
- package/dist/docs/entities/ParagraphStyle.js +37 -0
- package/dist/docs/entities/ParagraphStyle.js.map +1 -0
- package/dist/docs/entities/Range.d.ts +14 -0
- package/dist/docs/entities/Range.d.ts.map +1 -0
- package/dist/docs/entities/Range.js +21 -0
- package/dist/docs/entities/Range.js.map +1 -0
- package/dist/docs/entities/StructuralElement.d.ts +25 -0
- package/dist/docs/entities/StructuralElement.d.ts.map +1 -0
- package/dist/docs/entities/StructuralElement.js +37 -0
- package/dist/docs/entities/StructuralElement.js.map +1 -0
- package/dist/docs/entities/SubstringMatchCriteria.d.ts +13 -0
- package/dist/docs/entities/SubstringMatchCriteria.d.ts.map +1 -0
- package/dist/docs/entities/SubstringMatchCriteria.js +15 -0
- package/dist/docs/entities/SubstringMatchCriteria.js.map +1 -0
- package/dist/docs/entities/TextStyle.d.ts +29 -0
- package/dist/docs/entities/TextStyle.d.ts.map +1 -0
- package/dist/docs/entities/TextStyle.js +32 -0
- package/dist/docs/entities/TextStyle.js.map +1 -0
- package/dist/docs/index.d.ts +3 -0
- package/dist/docs/index.d.ts.map +1 -0
- package/dist/docs/index.js +26 -0
- package/dist/docs/index.js.map +1 -0
- package/dist/docs/instructions.d.ts +2 -0
- package/dist/docs/instructions.d.ts.map +1 -0
- package/dist/docs/instructions.js +27 -0
- package/dist/docs/instructions.js.map +1 -0
- package/dist/docs/lib/batch.d.ts +16 -0
- package/dist/docs/lib/batch.d.ts.map +1 -0
- package/dist/docs/lib/batch.js +21 -0
- package/dist/docs/lib/batch.js.map +1 -0
- package/dist/docs/lib/document.d.ts +13 -0
- package/dist/docs/lib/document.d.ts.map +1 -0
- package/dist/docs/lib/document.js +58 -0
- package/dist/docs/lib/document.js.map +1 -0
- package/dist/docs/methods/create_document/handler.d.ts +5 -0
- package/dist/docs/methods/create_document/handler.d.ts.map +1 -0
- package/dist/docs/methods/create_document/handler.js +6 -0
- package/dist/docs/methods/create_document/handler.js.map +1 -0
- package/dist/docs/methods/create_document/index.d.ts +26 -0
- package/dist/docs/methods/create_document/index.d.ts.map +1 -0
- package/dist/docs/methods/create_document/index.js +21 -0
- package/dist/docs/methods/create_document/index.js.map +1 -0
- package/dist/docs/methods/create_document/schema.d.ts +30 -0
- package/dist/docs/methods/create_document/schema.d.ts.map +1 -0
- package/dist/docs/methods/create_document/schema.js +16 -0
- package/dist/docs/methods/create_document/schema.js.map +1 -0
- package/dist/docs/methods/create_paragraph_bullets/handler.d.ts +5 -0
- package/dist/docs/methods/create_paragraph_bullets/handler.d.ts.map +1 -0
- package/dist/docs/methods/create_paragraph_bullets/handler.js +8 -0
- package/dist/docs/methods/create_paragraph_bullets/handler.js.map +1 -0
- package/dist/docs/methods/create_paragraph_bullets/index.d.ts +35 -0
- package/dist/docs/methods/create_paragraph_bullets/index.d.ts.map +1 -0
- package/dist/docs/methods/create_paragraph_bullets/index.js +23 -0
- package/dist/docs/methods/create_paragraph_bullets/index.js.map +1 -0
- package/dist/docs/methods/create_paragraph_bullets/schema.d.ts +32 -0
- package/dist/docs/methods/create_paragraph_bullets/schema.d.ts.map +1 -0
- package/dist/docs/methods/create_paragraph_bullets/schema.js +30 -0
- package/dist/docs/methods/create_paragraph_bullets/schema.js.map +1 -0
- package/dist/docs/methods/delete_content_range/handler.d.ts +5 -0
- package/dist/docs/methods/delete_content_range/handler.d.ts.map +1 -0
- package/dist/docs/methods/delete_content_range/handler.js +8 -0
- package/dist/docs/methods/delete_content_range/handler.js.map +1 -0
- package/dist/docs/methods/delete_content_range/index.d.ts +17 -0
- package/dist/docs/methods/delete_content_range/index.d.ts.map +1 -0
- package/dist/docs/methods/delete_content_range/index.js +22 -0
- package/dist/docs/methods/delete_content_range/index.js.map +1 -0
- package/dist/docs/methods/delete_content_range/schema.d.ts +15 -0
- package/dist/docs/methods/delete_content_range/schema.d.ts.map +1 -0
- package/dist/docs/methods/delete_content_range/schema.js +11 -0
- package/dist/docs/methods/delete_content_range/schema.js.map +1 -0
- package/dist/docs/methods/delete_paragraph_bullets/handler.d.ts +5 -0
- package/dist/docs/methods/delete_paragraph_bullets/handler.d.ts.map +1 -0
- package/dist/docs/methods/delete_paragraph_bullets/handler.js +8 -0
- package/dist/docs/methods/delete_paragraph_bullets/handler.js.map +1 -0
- package/dist/docs/methods/delete_paragraph_bullets/index.d.ts +18 -0
- package/dist/docs/methods/delete_paragraph_bullets/index.d.ts.map +1 -0
- package/dist/docs/methods/delete_paragraph_bullets/index.js +23 -0
- package/dist/docs/methods/delete_paragraph_bullets/index.js.map +1 -0
- package/dist/docs/methods/delete_paragraph_bullets/schema.d.ts +15 -0
- package/dist/docs/methods/delete_paragraph_bullets/schema.d.ts.map +1 -0
- package/dist/docs/methods/delete_paragraph_bullets/schema.js +11 -0
- package/dist/docs/methods/delete_paragraph_bullets/schema.js.map +1 -0
- package/dist/docs/methods/get_document/handler.d.ts +5 -0
- package/dist/docs/methods/get_document/handler.d.ts.map +1 -0
- package/dist/docs/methods/get_document/handler.js +6 -0
- package/dist/docs/methods/get_document/handler.js.map +1 -0
- package/dist/docs/methods/get_document/index.d.ts +27 -0
- package/dist/docs/methods/get_document/index.d.ts.map +1 -0
- package/dist/docs/methods/get_document/index.js +22 -0
- package/dist/docs/methods/get_document/index.js.map +1 -0
- package/dist/docs/methods/get_document/schema.d.ts +25 -0
- package/dist/docs/methods/get_document/schema.d.ts.map +1 -0
- package/dist/docs/methods/get_document/schema.js +9 -0
- package/dist/docs/methods/get_document/schema.js.map +1 -0
- package/dist/docs/methods/insert_text/handler.d.ts +5 -0
- package/dist/docs/methods/insert_text/handler.d.ts.map +1 -0
- package/dist/docs/methods/insert_text/handler.js +8 -0
- package/dist/docs/methods/insert_text/handler.js.map +1 -0
- package/dist/docs/methods/insert_text/index.d.ts +10 -0
- package/dist/docs/methods/insert_text/index.d.ts.map +1 -0
- package/dist/docs/methods/insert_text/index.js +17 -0
- package/dist/docs/methods/insert_text/index.js.map +1 -0
- package/dist/docs/methods/insert_text/schema.d.ts +13 -0
- package/dist/docs/methods/insert_text/schema.d.ts.map +1 -0
- package/dist/docs/methods/insert_text/schema.js +19 -0
- package/dist/docs/methods/insert_text/schema.js.map +1 -0
- package/dist/docs/methods/registry.d.ts +175 -0
- package/dist/docs/methods/registry.d.ts.map +1 -0
- package/dist/docs/methods/registry.js +32 -0
- package/dist/docs/methods/registry.js.map +1 -0
- package/dist/docs/methods/replace_all_text/handler.d.ts +5 -0
- package/dist/docs/methods/replace_all_text/handler.d.ts.map +1 -0
- package/dist/docs/methods/replace_all_text/handler.js +16 -0
- package/dist/docs/methods/replace_all_text/handler.js.map +1 -0
- package/dist/docs/methods/replace_all_text/index.d.ts +20 -0
- package/dist/docs/methods/replace_all_text/index.d.ts.map +1 -0
- package/dist/docs/methods/replace_all_text/index.js +23 -0
- package/dist/docs/methods/replace_all_text/index.js.map +1 -0
- package/dist/docs/methods/replace_all_text/schema.d.ts +17 -0
- package/dist/docs/methods/replace_all_text/schema.d.ts.map +1 -0
- package/dist/docs/methods/replace_all_text/schema.js +19 -0
- package/dist/docs/methods/replace_all_text/schema.js.map +1 -0
- package/dist/docs/methods/update_paragraph_style/handler.d.ts +5 -0
- package/dist/docs/methods/update_paragraph_style/handler.d.ts.map +1 -0
- package/dist/docs/methods/update_paragraph_style/handler.js +16 -0
- package/dist/docs/methods/update_paragraph_style/handler.js.map +1 -0
- package/dist/docs/methods/update_paragraph_style/index.d.ts +37 -0
- package/dist/docs/methods/update_paragraph_style/index.d.ts.map +1 -0
- package/dist/docs/methods/update_paragraph_style/index.js +22 -0
- package/dist/docs/methods/update_paragraph_style/index.js.map +1 -0
- package/dist/docs/methods/update_paragraph_style/schema.d.ts +35 -0
- package/dist/docs/methods/update_paragraph_style/schema.d.ts.map +1 -0
- package/dist/docs/methods/update_paragraph_style/schema.js +15 -0
- package/dist/docs/methods/update_paragraph_style/schema.js.map +1 -0
- package/dist/docs/methods/update_text_style/handler.d.ts +5 -0
- package/dist/docs/methods/update_text_style/handler.d.ts.map +1 -0
- package/dist/docs/methods/update_text_style/handler.js +26 -0
- package/dist/docs/methods/update_text_style/handler.js.map +1 -0
- package/dist/docs/methods/update_text_style/index.d.ts +32 -0
- package/dist/docs/methods/update_text_style/index.d.ts.map +1 -0
- package/dist/docs/methods/update_text_style/index.js +21 -0
- package/dist/docs/methods/update_text_style/index.js.map +1 -0
- package/dist/docs/methods/update_text_style/schema.d.ts +31 -0
- package/dist/docs/methods/update_text_style/schema.d.ts.map +1 -0
- package/dist/docs/methods/update_text_style/schema.js +15 -0
- package/dist/docs/methods/update_text_style/schema.js.map +1 -0
- package/dist/docs/operation.d.ts +12 -0
- package/dist/docs/operation.d.ts.map +1 -0
- package/dist/docs/operation.js +10 -0
- package/dist/docs/operation.js.map +1 -0
- package/dist/doctor/services.d.ts.map +1 -1
- package/dist/doctor/services.js +32 -1
- package/dist/doctor/services.js.map +1 -1
- package/package.json +8 -3
package/README.md
CHANGED
|
@@ -24,18 +24,18 @@
|
|
|
24
24
|
|
|
25
25
|
<img src=".github/assets/sheets.svg" height="44" alt="Sheets" title="Sheets" />
|
|
26
26
|
|
|
27
|
-
<img src=".github/assets/
|
|
27
|
+
<img src=".github/assets/docs.svg" height="44" alt="Docs" title="Docs" />
|
|
28
28
|
|
|
29
|
-
<img src=".github/assets/
|
|
29
|
+
<img src=".github/assets/drive.svg" height="44" alt="Drive (planned)" title="Drive (planned)" />
|
|
30
30
|
</p>
|
|
31
31
|
|
|
32
32
|
<p align="center">
|
|
33
|
-
<sub><strong>Gmail</strong> (<a href="./src/gmail/CAPABILITIES.md">33 operations</a>), <strong>Calendar</strong> (<a href="./src/calendar/CAPABILITIES.md">25 operations</a>),
|
|
33
|
+
<sub><strong>Gmail</strong> (<a href="./src/gmail/CAPABILITIES.md">33 operations</a>), <strong>Calendar</strong> (<a href="./src/calendar/CAPABILITIES.md">25 operations</a>), <strong>Sheets</strong> (<a href="./src/sheets/CAPABILITIES.md">15 operations</a>), and <strong>Docs</strong> (<a href="./src/docs/CAPABILITIES.md">9 operations</a>) ship today; Drive is on the way (shown dimmed).</sub>
|
|
34
34
|
</p>
|
|
35
35
|
|
|
36
36
|
## What it does
|
|
37
37
|
|
|
38
|
-
Point an AI agent at your Google accounts and let it do the work: triage and send mail, run your calendars,
|
|
38
|
+
Point an AI agent at your Google accounts and let it do the work: triage and send mail, run your calendars, read and write your spreadsheets, and draft and edit documents today; manage files as Drive lands. The end goal is an agent that operates your accounts and hands you results.
|
|
39
39
|
|
|
40
40
|
The design has two internal concepts and nothing else:
|
|
41
41
|
|
|
@@ -44,7 +44,7 @@ The design has two internal concepts and nothing else:
|
|
|
44
44
|
|
|
45
45
|
That is the whole surface. Read one operation folder and you understand all of them.
|
|
46
46
|
|
|
47
|
-
- **REST plus MCP in one surface.** Each server exposes the curated MCP toolset *and* the broader REST method set of its Google API, so an agent gets far more than a thin slice. Gmail ships with [33 operations](./src/gmail/CAPABILITIES.md) (10 curated MCP tools plus 23 REST methods), Calendar with [25](./src/calendar/CAPABILITIES.md) (8 plus 17),
|
|
47
|
+
- **REST plus MCP in one surface.** Each server exposes the curated MCP toolset *and* the broader REST method set of its Google API, so an agent gets far more than a thin slice. Gmail ships with [33 operations](./src/gmail/CAPABILITIES.md) (10 curated MCP tools plus 23 REST methods), Calendar with [25](./src/calendar/CAPABILITIES.md) (8 plus 17), Sheets with [15](./src/sheets/CAPABILITIES.md), and Docs with [9](./src/docs/CAPABILITIES.md) (Google publishes no MCP toolset for Sheets or Docs, so those are REST-sourced throughout); the split is explained in [MCP, and then some](#mcp-and-then-some).
|
|
48
48
|
- **The folder tree mirrors Google's docs.** A Google tools-list reference page becomes a `tools/` folder; a Google REST method reference page becomes a `methods/` folder. If you can find the operation in Google's docs, you can find it in this repo.
|
|
49
49
|
|
|
50
50
|
| Google's reference page | This repo's folder |
|
|
@@ -56,7 +56,7 @@ That is the whole surface. Read one operation folder and you understand all of t
|
|
|
56
56
|
- **Siloed by design.** Each service runs as its own independent server in its own lane; the orchestrating agent is the single thing that coordinates them.
|
|
57
57
|
- **Strict by construction.** Input and output schemas are validated on every call, vocabulary is sourced from Google's own docs, types are strict (NodeNext ESM, `verbatimModuleSyntax`, `noUncheckedIndexedAccess`), and coverage is pinned at 100% in `bunfig.toml`.
|
|
58
58
|
|
|
59
|
-
One package, one version: everything compiles into `google-mcp-suite`, which ships a bin per service (`google-mcp-gmail`, `google-mcp-calendar`, and `google-mcp-
|
|
59
|
+
One package, one version: everything compiles into `google-mcp-suite`, which ships a bin per service (`google-mcp-gmail`, `google-mcp-calendar`, `google-mcp-sheets`, and `google-mcp-docs` today) plus the `google-mcp-doctor` setup CLI.
|
|
60
60
|
|
|
61
61
|
## MCP, and then some
|
|
62
62
|
|
|
@@ -65,7 +65,7 @@ This is an MCP server, and deliberately more than one. Google publishes an MCP t
|
|
|
65
65
|
- **`tools/`** mirrors Google's **MCP toolset** reference, verbatim.
|
|
66
66
|
- **`methods/`** covers the broader **REST** reference, the operations the MCP toolset omits.
|
|
67
67
|
|
|
68
|
-
The split is Google's own (its MCP reference and its REST reference are separate trees); we keep it on disk on purpose and unify it operationally (one `Operation` type, one merged wire surface where everything is an MCP tool). The breadth of [the operation list](./src/gmail/CAPABILITIES.md) is the evidence that MCP alone is not enough for real work. Sheets
|
|
68
|
+
The split is Google's own (its MCP reference and its REST reference are separate trees); we keep it on disk on purpose and unify it operationally (one `Operation` type, one merged wire surface where everything is an MCP tool). The breadth of [the operation list](./src/gmail/CAPABILITIES.md) is the evidence that MCP alone is not enough for real work. Sheets and Docs are the limit case: Google publishes no MCP toolset for either, so those servers are methods-only ([15](./src/sheets/CAPABILITIES.md) and [9](./src/docs/CAPABILITIES.md) operations sourced entirely from the REST reference). Keeping the two sourced surfaces separate also makes each new operation a bounded, documentation-driven unit of work; the recipe is in [EXTENDING.md](./EXTENDING.md).
|
|
69
69
|
|
|
70
70
|
## Quickstart
|
|
71
71
|
|
|
@@ -103,6 +103,10 @@ Then point your MCP client at the servers, one instance per service per account:
|
|
|
103
103
|
"sheets-work": {
|
|
104
104
|
"command": "google-mcp-sheets",
|
|
105
105
|
"env": { "GOOGLE_MCP_ACCOUNT": "work@example.com" }
|
|
106
|
+
},
|
|
107
|
+
"docs-work": {
|
|
108
|
+
"command": "google-mcp-docs",
|
|
109
|
+
"env": { "GOOGLE_MCP_ACCOUNT": "work@example.com" }
|
|
106
110
|
}
|
|
107
111
|
}
|
|
108
112
|
}
|
|
@@ -122,6 +126,7 @@ src/
|
|
|
122
126
|
gmail/ # the Gmail server (reference/canary); new services mirror its shape
|
|
123
127
|
calendar/ # the Calendar server; same shape
|
|
124
128
|
sheets/ # the Sheets server; same shape, methods-only (no Google MCP toolset)
|
|
129
|
+
docs/ # the Docs server; same shape, methods-only
|
|
125
130
|
```
|
|
126
131
|
|
|
127
132
|
One package, one version. `auth`, `lib`, `doctor`, and each service are folders in one `src/` and compile to a single published package.
|
|
@@ -168,10 +173,10 @@ See [CONTRIBUTING.md](./CONTRIBUTING.md) for the full task list, [AGENTS.md](./A
|
|
|
168
173
|
| **Gmail** | ✅ Implemented | [33 operations](./src/gmail/CAPABILITIES.md): threads, messages, drafts, labels, filters, attachments |
|
|
169
174
|
| **Calendar** | ✅ Implemented | [25 operations](./src/calendar/CAPABILITIES.md): events, calendars, free/busy, and meeting-time suggestions |
|
|
170
175
|
| **Sheets** | ✅ Implemented | [15 operations](./src/sheets/CAPABILITIES.md): spreadsheets, values, batch and data-filter reads/writes, developer metadata |
|
|
176
|
+
| **Docs** | ✅ Implemented | [9 operations](./src/docs/CAPABILITIES.md): document reads and creation, curated text editing and styling |
|
|
171
177
|
| Drive | 🔜 Planned | files, folders, sharing, revisions |
|
|
172
|
-
| Docs | 🔜 Planned | documents, structured content |
|
|
173
178
|
|
|
174
|
-
Gmail is the reference (canary) implementation; Calendar is its first replication; Sheets
|
|
179
|
+
Gmail is the reference (canary) implementation; Calendar is its first replication; Sheets and Docs are methods-only (Google publishes no MCP toolset for them); each new service mirrors the same shape.
|
|
175
180
|
|
|
176
181
|
---
|
|
177
182
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../../src/docs/capabilities.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Regenerate CAPABILITIES.md from the live method registry: `bun run
|
|
3
|
+
// capabilities`. The doc is derived from the same registry the server lists
|
|
4
|
+
// and dispatches, so it cannot drift from the code. Agents that speak MCP should
|
|
5
|
+
// discover the live, fully-schema'd surface via the server's `tools/list`.
|
|
6
|
+
import { writeFileSync } from 'node:fs';
|
|
7
|
+
import { fileURLToPath } from 'node:url';
|
|
8
|
+
import { renderCapabilities } from '../lib/server.js';
|
|
9
|
+
import { methods } from './methods/registry.js';
|
|
10
|
+
if (import.meta.main) {
|
|
11
|
+
const out = fileURLToPath(new URL('./CAPABILITIES.md', import.meta.url));
|
|
12
|
+
writeFileSync(out, renderCapabilities('Docs capabilities', [{ kind: 'REST Method', operations: methods }]));
|
|
13
|
+
console.error(`Wrote CAPABILITIES.md (${Object.keys(methods).length} operations)`);
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=capabilities.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"capabilities.js","sourceRoot":"","sources":["../../src/docs/capabilities.ts"],"names":[],"mappings":";AACA,qEAAqE;AACrE,4EAA4E;AAC5E,iFAAiF;AACjF,2EAA2E;AAC3E,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;IACrB,MAAM,GAAG,GAAG,aAAa,CAAC,IAAI,GAAG,CAAC,mBAAmB,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;IACzE,aAAa,CACX,GAAG,EACH,kBAAkB,CAAC,mBAAmB,EAAE,CAAC,EAAE,IAAI,EAAE,aAAa,EAAE,UAAU,EAAE,OAAO,EAAE,CAAC,CAAC,CACxF,CAAC;IACF,OAAO,CAAC,KAAK,CAAC,0BAA0B,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,MAAM,cAAc,CAAC,CAAC;AACrF,CAAC","sourcesContent":["#!/usr/bin/env node\n// Regenerate CAPABILITIES.md from the live method registry: `bun run\n// capabilities`. The doc is derived from the same registry the server lists\n// and dispatches, so it cannot drift from the code. Agents that speak MCP should\n// discover the live, fully-schema'd surface via the server's `tools/list`.\nimport { writeFileSync } from 'node:fs';\nimport { fileURLToPath } from 'node:url';\nimport { renderCapabilities } from '../lib/server.js';\nimport { methods } from './methods/registry.js';\n\nif (import.meta.main) {\n const out = fileURLToPath(new URL('./CAPABILITIES.md', import.meta.url));\n writeFileSync(\n out,\n renderCapabilities('Docs capabilities', [{ kind: 'REST Method', operations: methods }]),\n );\n console.error(`Wrote CAPABILITIES.md (${Object.keys(methods).length} operations)`);\n}\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* What every curated write reports: the document the update was applied to
|
|
4
|
+
* and, when Google supplies one, the post-write revision. A projection of the
|
|
5
|
+
* REST BatchUpdateDocumentResponse, produced by `lib/batch.ts`.
|
|
6
|
+
*
|
|
7
|
+
* @see https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/batchUpdate#response-body
|
|
8
|
+
*/
|
|
9
|
+
export declare const BatchUpdateReceipt: z.ZodObject<{
|
|
10
|
+
documentId: z.ZodString;
|
|
11
|
+
revisionId: z.ZodOptional<z.ZodString>;
|
|
12
|
+
}, z.core.$strip>;
|
|
13
|
+
export type BatchUpdateReceipt = z.infer<typeof BatchUpdateReceipt>;
|
|
14
|
+
//# sourceMappingURL=BatchUpdateReceipt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BatchUpdateReceipt.d.ts","sourceRoot":"","sources":["../../../src/docs/entities/BatchUpdateReceipt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB;;;iBAM7B,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* What every curated write reports: the document the update was applied to
|
|
4
|
+
* and, when Google supplies one, the post-write revision. A projection of the
|
|
5
|
+
* REST BatchUpdateDocumentResponse, produced by `lib/batch.ts`.
|
|
6
|
+
*
|
|
7
|
+
* @see https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/batchUpdate#response-body
|
|
8
|
+
*/
|
|
9
|
+
export const BatchUpdateReceipt = z.object({
|
|
10
|
+
documentId: z.string().describe('The document the update was applied to.'),
|
|
11
|
+
revisionId: z
|
|
12
|
+
.string()
|
|
13
|
+
.optional()
|
|
14
|
+
.describe('The revision of the document after the write, when Google reports one.'),
|
|
15
|
+
});
|
|
16
|
+
//# sourceMappingURL=BatchUpdateReceipt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BatchUpdateReceipt.js","sourceRoot":"","sources":["../../../src/docs/entities/BatchUpdateReceipt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,yCAAyC,CAAC;IAC1E,UAAU,EAAE,CAAC;SACV,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,wEAAwE,CAAC;CACtF,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\n\n/**\n * What every curated write reports: the document the update was applied to\n * and, when Google supplies one, the post-write revision. A projection of the\n * REST BatchUpdateDocumentResponse, produced by `lib/batch.ts`.\n *\n * @see https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/batchUpdate#response-body\n */\nexport const BatchUpdateReceipt = z.object({\n documentId: z.string().describe('The document the update was applied to.'),\n revisionId: z\n .string()\n .optional()\n .describe('The revision of the document after the write, when Google reports one.'),\n});\n\nexport type BatchUpdateReceipt = z.infer<typeof BatchUpdateReceipt>;\n"]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* A document: identity, title, revision, and the body's blocks as text with
|
|
4
|
+
* UTF-16 index ranges. This projection is what an agent needs to read a
|
|
5
|
+
* document and to target edits; the recursive REST tree (tabs, table cells,
|
|
6
|
+
* styles, objects, suggestions) is deferred (issue #36), and the body is the
|
|
7
|
+
* legacy single-tab view.
|
|
8
|
+
*
|
|
9
|
+
* @see https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#Document
|
|
10
|
+
* @see https://developers.google.com/workspace/docs/api/concepts/structure
|
|
11
|
+
*/
|
|
12
|
+
export declare const Document: z.ZodObject<{
|
|
13
|
+
documentId: z.ZodString;
|
|
14
|
+
title: z.ZodOptional<z.ZodString>;
|
|
15
|
+
revisionId: z.ZodOptional<z.ZodString>;
|
|
16
|
+
content: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
17
|
+
startIndex: z.ZodOptional<z.ZodNumber>;
|
|
18
|
+
endIndex: z.ZodOptional<z.ZodNumber>;
|
|
19
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
20
|
+
paragraph: "paragraph";
|
|
21
|
+
sectionBreak: "sectionBreak";
|
|
22
|
+
table: "table";
|
|
23
|
+
tableOfContents: "tableOfContents";
|
|
24
|
+
}>>;
|
|
25
|
+
text: z.ZodOptional<z.ZodString>;
|
|
26
|
+
rows: z.ZodOptional<z.ZodNumber>;
|
|
27
|
+
columns: z.ZodOptional<z.ZodNumber>;
|
|
28
|
+
}, z.core.$strip>>>;
|
|
29
|
+
}, z.core.$strip>;
|
|
30
|
+
export type Document = z.infer<typeof Document>;
|
|
31
|
+
//# sourceMappingURL=Document.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Document.d.ts","sourceRoot":"","sources":["../../../src/docs/entities/Document.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;;;;;;;;GASG;AACH,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;iBAWnB,CAAC;AAEH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,QAAQ,CAAC,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { StructuralElement } from './StructuralElement.js';
|
|
3
|
+
/**
|
|
4
|
+
* A document: identity, title, revision, and the body's blocks as text with
|
|
5
|
+
* UTF-16 index ranges. This projection is what an agent needs to read a
|
|
6
|
+
* document and to target edits; the recursive REST tree (tabs, table cells,
|
|
7
|
+
* styles, objects, suggestions) is deferred (issue #36), and the body is the
|
|
8
|
+
* legacy single-tab view.
|
|
9
|
+
*
|
|
10
|
+
* @see https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#Document
|
|
11
|
+
* @see https://developers.google.com/workspace/docs/api/concepts/structure
|
|
12
|
+
*/
|
|
13
|
+
export const Document = z.object({
|
|
14
|
+
documentId: z.string().describe('The ID of the document.'),
|
|
15
|
+
title: z.string().optional().describe('The title of the document.'),
|
|
16
|
+
revisionId: z
|
|
17
|
+
.string()
|
|
18
|
+
.optional()
|
|
19
|
+
.describe('The revision ID of the document; changes with every edit.'),
|
|
20
|
+
content: z
|
|
21
|
+
.array(StructuralElement)
|
|
22
|
+
.optional()
|
|
23
|
+
.describe("The body's structural elements, in document order."),
|
|
24
|
+
});
|
|
25
|
+
//# sourceMappingURL=Document.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Document.js","sourceRoot":"","sources":["../../../src/docs/entities/Document.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/B,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,yBAAyB,CAAC;IAC1D,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,4BAA4B,CAAC;IACnE,UAAU,EAAE,CAAC;SACV,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,2DAA2D,CAAC;IACxE,OAAO,EAAE,CAAC;SACP,KAAK,CAAC,iBAAiB,CAAC;SACxB,QAAQ,EAAE;SACV,QAAQ,CAAC,oDAAoD,CAAC;CAClE,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\nimport { StructuralElement } from './StructuralElement.js';\n\n/**\n * A document: identity, title, revision, and the body's blocks as text with\n * UTF-16 index ranges. This projection is what an agent needs to read a\n * document and to target edits; the recursive REST tree (tabs, table cells,\n * styles, objects, suggestions) is deferred (issue #36), and the body is the\n * legacy single-tab view.\n *\n * @see https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#Document\n * @see https://developers.google.com/workspace/docs/api/concepts/structure\n */\nexport const Document = z.object({\n documentId: z.string().describe('The ID of the document.'),\n title: z.string().optional().describe('The title of the document.'),\n revisionId: z\n .string()\n .optional()\n .describe('The revision ID of the document; changes with every edit.'),\n content: z\n .array(StructuralElement)\n .optional()\n .describe(\"The body's structural elements, in document order.\"),\n});\n\nexport type Document = z.infer<typeof Document>;\n"]}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* The paragraph styling an agent can set on a range: a curated projection of
|
|
4
|
+
* the REST ParagraphStyle (indents, borders, shading, spacing modes, and
|
|
5
|
+
* direction stay in issue #35). Omitting a field leaves the existing style
|
|
6
|
+
* untouched, because the update's field mask is derived from the keys
|
|
7
|
+
* provided. Setting namedStyleType also resets other paragraph properties to
|
|
8
|
+
* match the named style, mirroring the Docs editor.
|
|
9
|
+
*
|
|
10
|
+
* @see https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#ParagraphStyle
|
|
11
|
+
*/
|
|
12
|
+
export declare const ParagraphStyle: z.ZodObject<{
|
|
13
|
+
namedStyleType: z.ZodOptional<z.ZodEnum<{
|
|
14
|
+
NORMAL_TEXT: "NORMAL_TEXT";
|
|
15
|
+
TITLE: "TITLE";
|
|
16
|
+
SUBTITLE: "SUBTITLE";
|
|
17
|
+
HEADING_1: "HEADING_1";
|
|
18
|
+
HEADING_2: "HEADING_2";
|
|
19
|
+
HEADING_3: "HEADING_3";
|
|
20
|
+
HEADING_4: "HEADING_4";
|
|
21
|
+
HEADING_5: "HEADING_5";
|
|
22
|
+
HEADING_6: "HEADING_6";
|
|
23
|
+
}>>;
|
|
24
|
+
alignment: z.ZodOptional<z.ZodEnum<{
|
|
25
|
+
START: "START";
|
|
26
|
+
CENTER: "CENTER";
|
|
27
|
+
END: "END";
|
|
28
|
+
JUSTIFIED: "JUSTIFIED";
|
|
29
|
+
}>>;
|
|
30
|
+
lineSpacing: z.ZodOptional<z.ZodNumber>;
|
|
31
|
+
}, z.core.$strip>;
|
|
32
|
+
export type ParagraphStyle = z.infer<typeof ParagraphStyle>;
|
|
33
|
+
//# sourceMappingURL=ParagraphStyle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ParagraphStyle.d.ts","sourceRoot":"","sources":["../../../src/docs/entities/ParagraphStyle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;GASG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;iBA0BzB,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* The paragraph styling an agent can set on a range: a curated projection of
|
|
4
|
+
* the REST ParagraphStyle (indents, borders, shading, spacing modes, and
|
|
5
|
+
* direction stay in issue #35). Omitting a field leaves the existing style
|
|
6
|
+
* untouched, because the update's field mask is derived from the keys
|
|
7
|
+
* provided. Setting namedStyleType also resets other paragraph properties to
|
|
8
|
+
* match the named style, mirroring the Docs editor.
|
|
9
|
+
*
|
|
10
|
+
* @see https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#ParagraphStyle
|
|
11
|
+
*/
|
|
12
|
+
export const ParagraphStyle = z.object({
|
|
13
|
+
namedStyleType: z
|
|
14
|
+
.enum([
|
|
15
|
+
'NORMAL_TEXT',
|
|
16
|
+
'TITLE',
|
|
17
|
+
'SUBTITLE',
|
|
18
|
+
'HEADING_1',
|
|
19
|
+
'HEADING_2',
|
|
20
|
+
'HEADING_3',
|
|
21
|
+
'HEADING_4',
|
|
22
|
+
'HEADING_5',
|
|
23
|
+
'HEADING_6',
|
|
24
|
+
])
|
|
25
|
+
.optional()
|
|
26
|
+
.describe('The named style type of the paragraph (headings, title, subtitle, normal text).'),
|
|
27
|
+
alignment: z
|
|
28
|
+
.enum(['START', 'CENTER', 'END', 'JUSTIFIED'])
|
|
29
|
+
.optional()
|
|
30
|
+
.describe('The text alignment for the paragraph.'),
|
|
31
|
+
lineSpacing: z
|
|
32
|
+
.number()
|
|
33
|
+
.positive()
|
|
34
|
+
.optional()
|
|
35
|
+
.describe('The amount of space between lines, as a percentage of normal (100 is single-spaced).'),
|
|
36
|
+
});
|
|
37
|
+
//# sourceMappingURL=ParagraphStyle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ParagraphStyle.js","sourceRoot":"","sources":["../../../src/docs/entities/ParagraphStyle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC;IACrC,cAAc,EAAE,CAAC;SACd,IAAI,CAAC;QACJ,aAAa;QACb,OAAO;QACP,UAAU;QACV,WAAW;QACX,WAAW;QACX,WAAW;QACX,WAAW;QACX,WAAW;QACX,WAAW;KACZ,CAAC;SACD,QAAQ,EAAE;SACV,QAAQ,CAAC,iFAAiF,CAAC;IAC9F,SAAS,EAAE,CAAC;SACT,IAAI,CAAC,CAAC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,CAAC,CAAC;SAC7C,QAAQ,EAAE;SACV,QAAQ,CAAC,uCAAuC,CAAC;IACpD,WAAW,EAAE,CAAC;SACX,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,EAAE;SACV,QAAQ,CACP,sFAAsF,CACvF;CACJ,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\n\n/**\n * The paragraph styling an agent can set on a range: a curated projection of\n * the REST ParagraphStyle (indents, borders, shading, spacing modes, and\n * direction stay in issue #35). Omitting a field leaves the existing style\n * untouched, because the update's field mask is derived from the keys\n * provided. Setting namedStyleType also resets other paragraph properties to\n * match the named style, mirroring the Docs editor.\n *\n * @see https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#ParagraphStyle\n */\nexport const ParagraphStyle = z.object({\n namedStyleType: z\n .enum([\n 'NORMAL_TEXT',\n 'TITLE',\n 'SUBTITLE',\n 'HEADING_1',\n 'HEADING_2',\n 'HEADING_3',\n 'HEADING_4',\n 'HEADING_5',\n 'HEADING_6',\n ])\n .optional()\n .describe('The named style type of the paragraph (headings, title, subtitle, normal text).'),\n alignment: z\n .enum(['START', 'CENTER', 'END', 'JUSTIFIED'])\n .optional()\n .describe('The text alignment for the paragraph.'),\n lineSpacing: z\n .number()\n .positive()\n .optional()\n .describe(\n 'The amount of space between lines, as a percentage of normal (100 is single-spaced).',\n ),\n});\n\nexport type ParagraphStyle = z.infer<typeof ParagraphStyle>;\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* A contiguous span of document body content, in zero-based UTF-16 code
|
|
4
|
+
* units, end-exclusive. The REST Range's `segmentId` and `tabId` are not
|
|
5
|
+
* exposed (issue #36): ranges address the body of the first tab.
|
|
6
|
+
*
|
|
7
|
+
* @see https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#Range
|
|
8
|
+
*/
|
|
9
|
+
export declare const Range: z.ZodObject<{
|
|
10
|
+
startIndex: z.ZodNumber;
|
|
11
|
+
endIndex: z.ZodNumber;
|
|
12
|
+
}, z.core.$strip>;
|
|
13
|
+
export type Range = z.infer<typeof Range>;
|
|
14
|
+
//# sourceMappingURL=Range.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Range.d.ts","sourceRoot":"","sources":["../../../src/docs/entities/Range.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;GAMG;AACH,eAAO,MAAM,KAAK;;;iBAehB,CAAC;AAEH,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,KAAK,CAAC,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* A contiguous span of document body content, in zero-based UTF-16 code
|
|
4
|
+
* units, end-exclusive. The REST Range's `segmentId` and `tabId` are not
|
|
5
|
+
* exposed (issue #36): ranges address the body of the first tab.
|
|
6
|
+
*
|
|
7
|
+
* @see https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#Range
|
|
8
|
+
*/
|
|
9
|
+
export const Range = z.object({
|
|
10
|
+
startIndex: z
|
|
11
|
+
.number()
|
|
12
|
+
.int()
|
|
13
|
+
.min(1)
|
|
14
|
+
.describe('The zero-based start index of the range, inclusive, in UTF-16 code units. Body content starts at index 1 (index 0 is the initial section break). Indices shift on every edit; re-read the document before computing ranges.'),
|
|
15
|
+
endIndex: z
|
|
16
|
+
.number()
|
|
17
|
+
.int()
|
|
18
|
+
.min(2)
|
|
19
|
+
.describe('The zero-based end index of the range, exclusive, in UTF-16 code units; must be greater than startIndex.'),
|
|
20
|
+
});
|
|
21
|
+
//# sourceMappingURL=Range.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Range.js","sourceRoot":"","sources":["../../../src/docs/entities/Range.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5B,UAAU,EAAE,CAAC;SACV,MAAM,EAAE;SACR,GAAG,EAAE;SACL,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,CACP,6NAA6N,CAC9N;IACH,QAAQ,EAAE,CAAC;SACR,MAAM,EAAE;SACR,GAAG,EAAE;SACL,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,CACP,0GAA0G,CAC3G;CACJ,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\n\n/**\n * A contiguous span of document body content, in zero-based UTF-16 code\n * units, end-exclusive. The REST Range's `segmentId` and `tabId` are not\n * exposed (issue #36): ranges address the body of the first tab.\n *\n * @see https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#Range\n */\nexport const Range = z.object({\n startIndex: z\n .number()\n .int()\n .min(1)\n .describe(\n 'The zero-based start index of the range, inclusive, in UTF-16 code units. Body content starts at index 1 (index 0 is the initial section break). Indices shift on every edit; re-read the document before computing ranges.',\n ),\n endIndex: z\n .number()\n .int()\n .min(2)\n .describe(\n 'The zero-based end index of the range, exclusive, in UTF-16 code units; must be greater than startIndex.',\n ),\n});\n\nexport type Range = z.infer<typeof Range>;\n"]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* One block of a document body, in document order: a paragraph, section
|
|
4
|
+
* break, table, or table of contents, addressed by its UTF-16 index range.
|
|
5
|
+
* A projection of the REST StructuralElement: paragraphs flatten to their
|
|
6
|
+
* concatenated run text, tables to their dimensions; the full recursive
|
|
7
|
+
* trees (cells, styles, inline objects, suggestions) are deferred (issue #36).
|
|
8
|
+
*
|
|
9
|
+
* @see https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#StructuralElement
|
|
10
|
+
*/
|
|
11
|
+
export declare const StructuralElement: z.ZodObject<{
|
|
12
|
+
startIndex: z.ZodOptional<z.ZodNumber>;
|
|
13
|
+
endIndex: z.ZodOptional<z.ZodNumber>;
|
|
14
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
15
|
+
paragraph: "paragraph";
|
|
16
|
+
sectionBreak: "sectionBreak";
|
|
17
|
+
table: "table";
|
|
18
|
+
tableOfContents: "tableOfContents";
|
|
19
|
+
}>>;
|
|
20
|
+
text: z.ZodOptional<z.ZodString>;
|
|
21
|
+
rows: z.ZodOptional<z.ZodNumber>;
|
|
22
|
+
columns: z.ZodOptional<z.ZodNumber>;
|
|
23
|
+
}, z.core.$strip>;
|
|
24
|
+
export type StructuralElement = z.infer<typeof StructuralElement>;
|
|
25
|
+
//# sourceMappingURL=StructuralElement.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StructuralElement.d.ts","sourceRoot":"","sources":["../../../src/docs/entities/StructuralElement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;GAQG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;iBA+B5B,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* One block of a document body, in document order: a paragraph, section
|
|
4
|
+
* break, table, or table of contents, addressed by its UTF-16 index range.
|
|
5
|
+
* A projection of the REST StructuralElement: paragraphs flatten to their
|
|
6
|
+
* concatenated run text, tables to their dimensions; the full recursive
|
|
7
|
+
* trees (cells, styles, inline objects, suggestions) are deferred (issue #36).
|
|
8
|
+
*
|
|
9
|
+
* @see https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#StructuralElement
|
|
10
|
+
*/
|
|
11
|
+
export const StructuralElement = z.object({
|
|
12
|
+
startIndex: z
|
|
13
|
+
.number()
|
|
14
|
+
.int()
|
|
15
|
+
.optional()
|
|
16
|
+
.describe('The zero-based start index of this element, in UTF-16 code units. Indices shift on every edit; re-read the document before computing new ranges.'),
|
|
17
|
+
endIndex: z
|
|
18
|
+
.number()
|
|
19
|
+
.int()
|
|
20
|
+
.optional()
|
|
21
|
+
.describe('The zero-based end index of this element, exclusive, in UTF-16 code units.'),
|
|
22
|
+
type: z
|
|
23
|
+
.enum(['paragraph', 'sectionBreak', 'table', 'tableOfContents'])
|
|
24
|
+
.optional()
|
|
25
|
+
.describe('Which kind of block this is; absent for a structural kind this server does not know (the indices still address it).'),
|
|
26
|
+
text: z
|
|
27
|
+
.string()
|
|
28
|
+
.optional()
|
|
29
|
+
.describe("A paragraph's text: its runs concatenated, newline-terminated; absent for non-paragraph elements. Non-text elements (images, footnote references, chips) appear as one U+FFFC placeholder per UTF-16 unit they occupy, so the text length always equals endIndex - startIndex."),
|
|
30
|
+
rows: z.number().int().optional().describe("A table's row count; absent for non-table elements."),
|
|
31
|
+
columns: z
|
|
32
|
+
.number()
|
|
33
|
+
.int()
|
|
34
|
+
.optional()
|
|
35
|
+
.describe("A table's column count; absent for non-table elements."),
|
|
36
|
+
});
|
|
37
|
+
//# sourceMappingURL=StructuralElement.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StructuralElement.js","sourceRoot":"","sources":["../../../src/docs/entities/StructuralElement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,UAAU,EAAE,CAAC;SACV,MAAM,EAAE;SACR,GAAG,EAAE;SACL,QAAQ,EAAE;SACV,QAAQ,CACP,kJAAkJ,CACnJ;IACH,QAAQ,EAAE,CAAC;SACR,MAAM,EAAE;SACR,GAAG,EAAE;SACL,QAAQ,EAAE;SACV,QAAQ,CAAC,4EAA4E,CAAC;IACzF,IAAI,EAAE,CAAC;SACJ,IAAI,CAAC,CAAC,WAAW,EAAE,cAAc,EAAE,OAAO,EAAE,iBAAiB,CAAC,CAAC;SAC/D,QAAQ,EAAE;SACV,QAAQ,CACP,qHAAqH,CACtH;IACH,IAAI,EAAE,CAAC;SACJ,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CACP,gRAAgR,CACjR;IACH,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,qDAAqD,CAAC;IACjG,OAAO,EAAE,CAAC;SACP,MAAM,EAAE;SACR,GAAG,EAAE;SACL,QAAQ,EAAE;SACV,QAAQ,CAAC,wDAAwD,CAAC;CACtE,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\n\n/**\n * One block of a document body, in document order: a paragraph, section\n * break, table, or table of contents, addressed by its UTF-16 index range.\n * A projection of the REST StructuralElement: paragraphs flatten to their\n * concatenated run text, tables to their dimensions; the full recursive\n * trees (cells, styles, inline objects, suggestions) are deferred (issue #36).\n *\n * @see https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#StructuralElement\n */\nexport const StructuralElement = z.object({\n startIndex: z\n .number()\n .int()\n .optional()\n .describe(\n 'The zero-based start index of this element, in UTF-16 code units. Indices shift on every edit; re-read the document before computing new ranges.',\n ),\n endIndex: z\n .number()\n .int()\n .optional()\n .describe('The zero-based end index of this element, exclusive, in UTF-16 code units.'),\n type: z\n .enum(['paragraph', 'sectionBreak', 'table', 'tableOfContents'])\n .optional()\n .describe(\n 'Which kind of block this is; absent for a structural kind this server does not know (the indices still address it).',\n ),\n text: z\n .string()\n .optional()\n .describe(\n \"A paragraph's text: its runs concatenated, newline-terminated; absent for non-paragraph elements. Non-text elements (images, footnote references, chips) appear as one U+FFFC placeholder per UTF-16 unit they occupy, so the text length always equals endIndex - startIndex.\",\n ),\n rows: z.number().int().optional().describe(\"A table's row count; absent for non-table elements.\"),\n columns: z\n .number()\n .int()\n .optional()\n .describe(\"A table's column count; absent for non-table elements.\"),\n});\n\nexport type StructuralElement = z.infer<typeof StructuralElement>;\n"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* What text to find in the document: a plain substring with optional case
|
|
4
|
+
* sensitivity. The REST criteria's `searchByRegex` is not exposed (issue #35).
|
|
5
|
+
*
|
|
6
|
+
* @see https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#SubstringMatchCriteria
|
|
7
|
+
*/
|
|
8
|
+
export declare const SubstringMatchCriteria: z.ZodObject<{
|
|
9
|
+
text: z.ZodString;
|
|
10
|
+
matchCase: z.ZodOptional<z.ZodBoolean>;
|
|
11
|
+
}, z.core.$strip>;
|
|
12
|
+
export type SubstringMatchCriteria = z.infer<typeof SubstringMatchCriteria>;
|
|
13
|
+
//# sourceMappingURL=SubstringMatchCriteria.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SubstringMatchCriteria.d.ts","sourceRoot":"","sources":["../../../src/docs/entities/SubstringMatchCriteria.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB;;;iBAMjC,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* What text to find in the document: a plain substring with optional case
|
|
4
|
+
* sensitivity. The REST criteria's `searchByRegex` is not exposed (issue #35).
|
|
5
|
+
*
|
|
6
|
+
* @see https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#SubstringMatchCriteria
|
|
7
|
+
*/
|
|
8
|
+
export const SubstringMatchCriteria = z.object({
|
|
9
|
+
text: z.string().min(1).describe('The text to search for in the document.'),
|
|
10
|
+
matchCase: z
|
|
11
|
+
.boolean()
|
|
12
|
+
.optional()
|
|
13
|
+
.describe('Whether the search respects case. Defaults to false (case-insensitive).'),
|
|
14
|
+
});
|
|
15
|
+
//# sourceMappingURL=SubstringMatchCriteria.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SubstringMatchCriteria.js","sourceRoot":"","sources":["../../../src/docs/entities/SubstringMatchCriteria.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;GAKG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,yCAAyC,CAAC;IAC3E,SAAS,EAAE,CAAC;SACT,OAAO,EAAE;SACT,QAAQ,EAAE;SACV,QAAQ,CAAC,yEAAyE,CAAC;CACvF,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\n\n/**\n * What text to find in the document: a plain substring with optional case\n * sensitivity. The REST criteria's `searchByRegex` is not exposed (issue #35).\n *\n * @see https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/request#SubstringMatchCriteria\n */\nexport const SubstringMatchCriteria = z.object({\n text: z.string().min(1).describe('The text to search for in the document.'),\n matchCase: z\n .boolean()\n .optional()\n .describe('Whether the search respects case. Defaults to false (case-insensitive).'),\n});\n\nexport type SubstringMatchCriteria = z.infer<typeof SubstringMatchCriteria>;\n"]}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* The character styling an agent can set on a range of text: a curated
|
|
4
|
+
* projection of the REST TextStyle (colors and font families stay in issue
|
|
5
|
+
* #35; tab, bookmark, and heading links ride with issue #36's tab work).
|
|
6
|
+
* Setting a boolean to false turns the style off; omitting a field leaves
|
|
7
|
+
* the existing style untouched, because the update's field mask is derived
|
|
8
|
+
* from the keys provided.
|
|
9
|
+
*
|
|
10
|
+
* @see https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#TextStyle
|
|
11
|
+
*/
|
|
12
|
+
export declare const TextStyle: z.ZodObject<{
|
|
13
|
+
bold: z.ZodOptional<z.ZodBoolean>;
|
|
14
|
+
italic: z.ZodOptional<z.ZodBoolean>;
|
|
15
|
+
underline: z.ZodOptional<z.ZodBoolean>;
|
|
16
|
+
strikethrough: z.ZodOptional<z.ZodBoolean>;
|
|
17
|
+
smallCaps: z.ZodOptional<z.ZodBoolean>;
|
|
18
|
+
baselineOffset: z.ZodOptional<z.ZodEnum<{
|
|
19
|
+
NONE: "NONE";
|
|
20
|
+
SUPERSCRIPT: "SUPERSCRIPT";
|
|
21
|
+
SUBSCRIPT: "SUBSCRIPT";
|
|
22
|
+
}>>;
|
|
23
|
+
fontSize: z.ZodOptional<z.ZodNumber>;
|
|
24
|
+
link: z.ZodOptional<z.ZodObject<{
|
|
25
|
+
url: z.ZodString;
|
|
26
|
+
}, z.core.$strip>>;
|
|
27
|
+
}, z.core.$strip>;
|
|
28
|
+
export type TextStyle = z.infer<typeof TextStyle>;
|
|
29
|
+
//# sourceMappingURL=TextStyle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextStyle.d.ts","sourceRoot":"","sources":["../../../src/docs/entities/TextStyle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;GASG;AACH,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;iBAqBpB,CAAC;AAEH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* The character styling an agent can set on a range of text: a curated
|
|
4
|
+
* projection of the REST TextStyle (colors and font families stay in issue
|
|
5
|
+
* #35; tab, bookmark, and heading links ride with issue #36's tab work).
|
|
6
|
+
* Setting a boolean to false turns the style off; omitting a field leaves
|
|
7
|
+
* the existing style untouched, because the update's field mask is derived
|
|
8
|
+
* from the keys provided.
|
|
9
|
+
*
|
|
10
|
+
* @see https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#TextStyle
|
|
11
|
+
*/
|
|
12
|
+
export const TextStyle = z.object({
|
|
13
|
+
bold: z.boolean().optional().describe('Whether the text is rendered as bold.'),
|
|
14
|
+
italic: z.boolean().optional().describe('Whether the text is italicized.'),
|
|
15
|
+
underline: z.boolean().optional().describe('Whether the text is underlined.'),
|
|
16
|
+
strikethrough: z.boolean().optional().describe('Whether the text is struck through.'),
|
|
17
|
+
smallCaps: z.boolean().optional().describe('Whether the text is in small capital letters.'),
|
|
18
|
+
baselineOffset: z
|
|
19
|
+
.enum(['NONE', 'SUPERSCRIPT', 'SUBSCRIPT'])
|
|
20
|
+
.optional()
|
|
21
|
+
.describe("The text's vertical offset from its normal position; NONE resets a previous offset. Superscript and subscript text is automatically rendered smaller."),
|
|
22
|
+
fontSize: z
|
|
23
|
+
.number()
|
|
24
|
+
.positive()
|
|
25
|
+
.optional()
|
|
26
|
+
.describe("The size of the text's font, in points (PT is the API's only unit)."),
|
|
27
|
+
link: z
|
|
28
|
+
.object({ url: z.string().describe('An external URL.') })
|
|
29
|
+
.optional()
|
|
30
|
+
.describe('The hyperlink destination of the text.'),
|
|
31
|
+
});
|
|
32
|
+
//# sourceMappingURL=TextStyle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextStyle.js","sourceRoot":"","sources":["../../../src/docs/entities/TextStyle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,CAAC,MAAM,CAAC;IAChC,IAAI,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,uCAAuC,CAAC;IAC9E,MAAM,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,iCAAiC,CAAC;IAC1E,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,iCAAiC,CAAC;IAC7E,aAAa,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,qCAAqC,CAAC;IACrF,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,+CAA+C,CAAC;IAC3F,cAAc,EAAE,CAAC;SACd,IAAI,CAAC,CAAC,MAAM,EAAE,aAAa,EAAE,WAAW,CAAC,CAAC;SAC1C,QAAQ,EAAE;SACV,QAAQ,CACP,uJAAuJ,CACxJ;IACH,QAAQ,EAAE,CAAC;SACR,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,EAAE;SACV,QAAQ,CAAC,qEAAqE,CAAC;IAClF,IAAI,EAAE,CAAC;SACJ,MAAM,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,kBAAkB,CAAC,EAAE,CAAC;SACxD,QAAQ,EAAE;SACV,QAAQ,CAAC,wCAAwC,CAAC;CACtD,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\n\n/**\n * The character styling an agent can set on a range of text: a curated\n * projection of the REST TextStyle (colors and font families stay in issue\n * #35; tab, bookmark, and heading links ride with issue #36's tab work).\n * Setting a boolean to false turns the style off; omitting a field leaves\n * the existing style untouched, because the update's field mask is derived\n * from the keys provided.\n *\n * @see https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#TextStyle\n */\nexport const TextStyle = z.object({\n bold: z.boolean().optional().describe('Whether the text is rendered as bold.'),\n italic: z.boolean().optional().describe('Whether the text is italicized.'),\n underline: z.boolean().optional().describe('Whether the text is underlined.'),\n strikethrough: z.boolean().optional().describe('Whether the text is struck through.'),\n smallCaps: z.boolean().optional().describe('Whether the text is in small capital letters.'),\n baselineOffset: z\n .enum(['NONE', 'SUPERSCRIPT', 'SUBSCRIPT'])\n .optional()\n .describe(\n \"The text's vertical offset from its normal position; NONE resets a previous offset. Superscript and subscript text is automatically rendered smaller.\",\n ),\n fontSize: z\n .number()\n .positive()\n .optional()\n .describe(\"The size of the text's font, in points (PT is the API's only unit).\"),\n link: z\n .object({ url: z.string().describe('An external URL.') })\n .optional()\n .describe('The hyperlink destination of the text.'),\n});\n\nexport type TextStyle = z.infer<typeof TextStyle>;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/docs/index.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { docs } from '@googleapis/docs';
|
|
3
|
+
import { authorizedClient, runAuthFlow } from '../auth/oauth.js';
|
|
4
|
+
import { mergeOperations } from '../lib/operation.js';
|
|
5
|
+
import { server } from '../lib/server.js';
|
|
6
|
+
import { instructions } from './instructions.js';
|
|
7
|
+
import { methods } from './methods/registry.js';
|
|
8
|
+
// Cloning this for a new service? Add that service's OAuth scopes to `SCOPES` in
|
|
9
|
+
// src/auth/config.ts BEFORE the first auth. The scope union is front-loaded so each
|
|
10
|
+
// account consents once, and Google only re-issues a refresh token on a fresh grant;
|
|
11
|
+
// adding a scope later forces re-consent of every account. Nothing in this file
|
|
12
|
+
// references scopes, which is exactly why it is easy to miss.
|
|
13
|
+
//
|
|
14
|
+
// Docs is methods-only: Google publishes no MCP toolset for Docs (its
|
|
15
|
+
// MCP-supported products are Gmail, Drive, Calendar, Chat, and People), so there
|
|
16
|
+
// is no tools/ folder and the REST-sourced methods are the whole surface.
|
|
17
|
+
await server({
|
|
18
|
+
name: 'docs',
|
|
19
|
+
title: 'Google Docs (google-mcp-suite)',
|
|
20
|
+
description: 'Per-account Google Docs MCP server: document reads and creation plus curated text editing.',
|
|
21
|
+
instructions,
|
|
22
|
+
operations: mergeOperations(methods),
|
|
23
|
+
client: async (account) => docs({ version: 'v1', auth: await authorizedClient(account) }),
|
|
24
|
+
runAuth: runAuthFlow,
|
|
25
|
+
});
|
|
26
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/docs/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,iFAAiF;AACjF,oFAAoF;AACpF,qFAAqF;AACrF,gFAAgF;AAChF,8DAA8D;AAC9D,EAAE;AACF,sEAAsE;AACtE,iFAAiF;AACjF,0EAA0E;AAC1E,MAAM,MAAM,CAAC;IACX,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,gCAAgC;IACvC,WAAW,EACT,4FAA4F;IAC9F,YAAY;IACZ,UAAU,EAAE,eAAe,CAAC,OAAO,CAAC;IACpC,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC,OAAO,CAAC,EAAE,CAAC;IACzF,OAAO,EAAE,WAAW;CACrB,CAAC,CAAC","sourcesContent":["#!/usr/bin/env node\nimport { docs } from '@googleapis/docs';\nimport { authorizedClient, runAuthFlow } from '../auth/oauth.js';\nimport { mergeOperations } from '../lib/operation.js';\nimport { server } from '../lib/server.js';\nimport { instructions } from './instructions.js';\nimport { methods } from './methods/registry.js';\n\n// Cloning this for a new service? Add that service's OAuth scopes to `SCOPES` in\n// src/auth/config.ts BEFORE the first auth. The scope union is front-loaded so each\n// account consents once, and Google only re-issues a refresh token on a fresh grant;\n// adding a scope later forces re-consent of every account. Nothing in this file\n// references scopes, which is exactly why it is easy to miss.\n//\n// Docs is methods-only: Google publishes no MCP toolset for Docs (its\n// MCP-supported products are Gmail, Drive, Calendar, Chat, and People), so there\n// is no tools/ folder and the REST-sourced methods are the whole surface.\nawait server({\n name: 'docs',\n title: 'Google Docs (google-mcp-suite)',\n description:\n 'Per-account Google Docs MCP server: document reads and creation plus curated text editing.',\n instructions,\n operations: mergeOperations(methods),\n client: async (account) => docs({ version: 'v1', auth: await authorizedClient(account) }),\n runAuth: runAuthFlow,\n});\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instructions.d.ts","sourceRoot":"","sources":["../../src/docs/instructions.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,YAAY,QAmBkC,CAAC"}
|