mcp-gsheets 1.7.0 → 1.8.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.
Files changed (3) hide show
  1. package/README.md +55 -3
  2. package/dist/index.js +780 -269
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -9,7 +9,7 @@
9
9
  ![Coverage](https://codecov.io/gh/freema/mcp-gsheets/branch/main/graph/badge.svg)
10
10
  ![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)
11
11
  ![TypeScript](https://img.shields.io/badge/TypeScript-5.0%2B-007ACC?logo=typescript&logoColor=white)
12
- ![Node](https://img.shields.io/badge/Node.js-18%2B-339933?logo=node.js&logoColor=white)
12
+ ![Node](https://img.shields.io/badge/Node.js-20%2B-339933?logo=node.js&logoColor=white)
13
13
  ![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?logo=prettier&logoColor=white)
14
14
 
15
15
  A Model Context Protocol (MCP) server for Google Sheets API integration. Enables reading, writing, and managing Google Sheets documents directly from your MCP client (e.g., Claude Code, Claude Desktop, Cursor, etc.).
@@ -23,7 +23,7 @@ A Model Context Protocol (MCP) server for Google Sheets API integration. Enables
23
23
 
24
24
  ## Requirements
25
25
 
26
- - [Node.js](https://nodejs.org/) v18 or higher
26
+ - [Node.js](https://nodejs.org/) v20 or higher
27
27
  - [Google Cloud Project](https://console.cloud.google.com) with Sheets API enabled
28
28
  - Service Account with JSON key file
29
29
  - [npm](https://www.npmjs.com/)
@@ -330,6 +330,8 @@ npm run dev # Watch mode with auto-reload
330
330
  | `sheets_append_values` | Append rows after the last row of an existing table. **Default `insertDataOption` is `OVERWRITE`** — set `INSERT_ROWS` to push existing rows down | `spreadsheetId`, `range`, `values`, `valueInputOption`, `insertDataOption` |
331
331
  | `sheets_clear_values` | Clear all values in a range (preserves formatting) | `spreadsheetId`, `range` |
332
332
  | `sheets_insert_rows` | Insert blank or pre-filled rows at a specific position | `spreadsheetId`, `range` (anchor), `rows`, `position` (BEFORE/AFTER), `values` |
333
+ | `sheets_delete_columns` | Delete one or more columns using a full-column A1 range | `spreadsheetId`, `range` (e.g. `Sheet1!B:D`) |
334
+ | `sheets_delete_rows` | Delete one or more rows using a full-row A1 range | `spreadsheetId`, `range` (e.g. `Sheet1!2:4`) |
333
335
  | `sheets_insert_link` | Insert a hyperlink formula into a cell | `spreadsheetId`, `range`, `url`, `label` |
334
336
  | `sheets_insert_date` | Insert a date/datetime value formatted correctly into a cell | `spreadsheetId`, `range`, `date`, `format` |
335
337
 
@@ -375,6 +377,8 @@ npm run dev # Watch mode with auto-reload
375
377
  | `sheets_get_sheet_structure` | Lightweight structural metadata only — no per-cell data. Returns dimensions, frozen rows/cols, tab colour, column widths, row heights, hidden columns/rows, and all merges in A1 notation. Single fast API call | `spreadsheetId`, `sheetName` |
376
378
  | `sheets_get_formatting_compact` | Read cell formatting for a range and return it as compact A1Range→format pairs (run-length encoded). Identical adjacent cells are collapsed into rectangular ranges — reduces output by 90 %+ compared to per-cell data | `spreadsheetId`, `sheetName`, `range`, `useEffectiveFormat`, `fields` |
377
379
  | `sheets_get_full_sheet_snapshot` | Master one-shot tool — returns all structural and formatting metadata (merges, dimensions, conditional formatting, and optionally cell formatting) in a single API call. Supports `fields` filter and `compactMode` to limit response size | `spreadsheetId`, `sheetName`, `includeFormattingRange`, `fields`, `compactMode` |
380
+ | `sheets_get_basic_filter` | Read the Basic Filter (AutoFilter) configuration for a sheet, including filtered range, sort specs, and per-column filter criteria (hidden values, conditions, colour filters) | `spreadsheetId`, `sheetName` |
381
+ | `sheets_get_data_validation` | Read data validation rules (checkboxes, dropdowns, custom formulas) from a sheet or range. Returns compact run-length-encoded list of unique rules grouped by cell ranges | `spreadsheetId`, `sheetName`, `range` |
378
382
 
379
383
  ## 🔧 Code Quality
380
384
 
@@ -535,6 +539,54 @@ Insert new rows at a specific position in a spreadsheet with optional data.
535
539
  }
536
540
  ```
537
541
 
542
+ ### sheets_delete_columns
543
+
544
+ Delete one or more columns from a sheet using a full-column A1 range.
545
+
546
+ **Parameters:**
547
+ - `spreadsheetId` (required): The ID of the spreadsheet
548
+ - `range` (required): Full-column A1 range to delete (e.g., "Sheet1!B:D" or "Sheet1!C:C")
549
+
550
+ **Examples:**
551
+
552
+ ```javascript
553
+ // Delete columns B through D from Sheet1
554
+ {
555
+ "spreadsheetId": "your-spreadsheet-id",
556
+ "range": "Sheet1!B:D"
557
+ }
558
+
559
+ // Delete a single column from the first sheet
560
+ {
561
+ "spreadsheetId": "your-spreadsheet-id",
562
+ "range": "C:C"
563
+ }
564
+ ```
565
+
566
+ ### sheets_delete_rows
567
+
568
+ Delete one or more rows from a sheet using a full-row A1 range.
569
+
570
+ **Parameters:**
571
+ - `spreadsheetId` (required): The ID of the spreadsheet
572
+ - `range` (required): Full-row A1 range to delete (e.g., "Sheet1!2:4" or "Sheet1!3:3")
573
+
574
+ **Examples:**
575
+
576
+ ```javascript
577
+ // Delete rows 2 through 4 from Sheet1
578
+ {
579
+ "spreadsheetId": "your-spreadsheet-id",
580
+ "range": "Sheet1!2:4"
581
+ }
582
+
583
+ // Delete a single row from the first sheet
584
+ {
585
+ "spreadsheetId": "your-spreadsheet-id",
586
+ "range": "3:3"
587
+ }
588
+ ```
589
+
538
590
  ## 📋 Changelog
539
591
 
540
592
  See [CHANGELOG.md](CHANGELOG.md) for a list of changes in each version.
@@ -554,4 +606,4 @@ See [CHANGELOG.md](CHANGELOG.md) for a list of changes in each version.
554
606
 
555
607
  ## 📄 License
556
608
 
557
- This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
609
+ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.