mcp-gsheets 1.9.0 → 1.10.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 (3) hide show
  1. package/README.md +56 -0
  2. package/dist/index.js +14017 -7109
  3. package/package.json +5 -5
package/README.md CHANGED
@@ -312,6 +312,62 @@ cp .env.example .env
312
312
  npm run dev # Watch mode with auto-reload
313
313
  ```
314
314
 
315
+ ## 🎚️ Reducing context cost with toolsets
316
+
317
+ All 44 tools together cost about **9,900 tokens of context in every session**,
318
+ before the model does anything. Most workflows need a fraction of that.
319
+ `GSHEETS_TOOLSETS` limits which tools the server exposes:
320
+
321
+ ```json
322
+ {
323
+ "mcpServers": {
324
+ "gsheets": {
325
+ "command": "npx",
326
+ "args": ["mcp-gsheets"],
327
+ "env": {
328
+ "GOOGLE_PROJECT_ID": "your-project-id",
329
+ "GOOGLE_APPLICATION_CREDENTIALS": "/path/to/key.json",
330
+ "GSHEETS_TOOLSETS": "core,charts"
331
+ }
332
+ }
333
+ }
334
+ }
335
+ ```
336
+
337
+ | Toolset | Tools | What it covers |
338
+ |---|---|---|
339
+ | `core` | 11 | Read/write values, metadata, sheet structure, create spreadsheet |
340
+ | `sheets` | 9 | Sheet lifecycle, rows and columns |
341
+ | `formatting` | 15 | Colours, borders, merges, conditional rules, links, dates |
342
+ | `charts` | 3 | Create, update, delete charts |
343
+ | `tables` | 4 | Native tables |
344
+ | `analysis` | 2 | Full-sheet snapshot, range comparison |
345
+
346
+ Measured `tools/list` cost:
347
+
348
+ | Configuration | Tools | ≈ Tokens |
349
+ |---|---|---|
350
+ | _unset_ (default, all toolsets) | 44 | 9,875 |
351
+ | `GSHEETS_TOOLSETS=core` | 11 | 1,986 |
352
+ | `GSHEETS_TOOLSETS=core,sheets` | 20 | 3,548 |
353
+ | `GSHEETS_READ_ONLY=true` | 16 | 3,599 |
354
+ | `GSHEETS_TOOLSETS=core` + read-only | 6 | 912 |
355
+
356
+ Notes:
357
+
358
+ - **The default is unchanged** — leave `GSHEETS_TOOLSETS` unset and you get
359
+ every tool, exactly as before.
360
+ - **`core` is always included.** `GSHEETS_TOOLSETS=charts` means "charts as
361
+ well as core", not "charts only" — without core the server cannot read a cell.
362
+ - **A typo is a startup error**, not a silently smaller tool list.
363
+ - `GSHEETS_READ_ONLY=true` drops every writing tool and can be combined with
364
+ `GSHEETS_TOOLSETS`. It is enforced when a tool is called, not just when the
365
+ list is built, so a client cannot write by naming a hidden tool.
366
+
367
+ All tools also carry MCP annotations (`readOnlyHint`, `destructiveHint`,
368
+ `idempotentHint`), so clients can skip confirmation prompts on reads and warn
369
+ before destructive operations.
370
+
315
371
  ## 📋 Available Tools
316
372
 
317
373
  ### Reading Data