{
  "markdown": "<!-- mcp-name: io.github.freema/mcp-gsheets -->\n\n# MCP Google Sheets Server\n\n<a href=\"https://glama.ai/mcp/servers/@freema/mcp-gsheets\">\n  <img width=\"380\" height=\"200\" src=\"https://glama.ai/mcp/servers/@freema/mcp-gsheets/badge\" />\n</a>\n\n[![npm version](https://badge.fury.io/js/mcp-gsheets.svg)](https://www.npmjs.com/package/mcp-gsheets)\n![CI](https://github.com/freema/mcp-gsheets/workflows/CI/badge.svg)\n![Coverage](https://codecov.io/gh/freema/mcp-gsheets/branch/main/graph/badge.svg)\n![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)\n![TypeScript](https://img.shields.io/badge/TypeScript-5.0%2B-007ACC?logo=typescript&logoColor=white)\n![Node](https://img.shields.io/badge/Node.js-20%2B-339933?logo=node.js&logoColor=white)\n![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?logo=prettier&logoColor=white)\n\nA 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.).\n\n## Key Features\n\n- **Complete Google Sheets Integration**: Read, write, and manage spreadsheets\n- **Advanced Operations**: Batch operations, formatting, charts, and conditional formatting\n- **Flexible Authentication**: Support for both file-based and JSON string credentials\n- **Production Ready**: Built with TypeScript, comprehensive error handling, and full test coverage\n\n## Requirements\n\n- [Node.js](https://nodejs.org/) v20 or higher\n- [Google Cloud Project](https://console.cloud.google.com) with Sheets API enabled\n- Service Account with JSON key file\n- [npm](https://www.npmjs.com/)\n\n## Getting Started\n\n### Quick Install (Recommended)\n\nAdd the following config to your MCP client:\n\n```json\n{\n  \"mcpServers\": {\n    \"mcp-gsheets\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"mcp-gsheets@latest\"],\n      \"env\": {\n        \"GOOGLE_PROJECT_ID\": \"your-project-id\",\n        \"GOOGLE_APPLICATION_CREDENTIALS\": \"/absolute/path/to/service-account-key.json\"\n      }\n    }\n  }\n}\n```\n\n> [!NOTE]\n> Using `mcp-gsheets@latest` ensures that your MCP client will always use the latest version of the MCP Google Sheets server.\n\n### MCP Client Configuration\n\n<details>\n  <summary>Claude Code</summary>\n  Use the Claude Code CLI to add the MCP Google Sheets server (<a href=\"https://docs.anthropic.com/en/docs/claude-code/mcp\">guide</a>):\n\n```bash\nclaude mcp add mcp-gsheets npx mcp-gsheets@latest\n```\n\nAfter adding, edit your Claude Code config to add the required environment variables:\n\n```json\n{\n  \"mcpServers\": {\n    \"mcp-gsheets\": {\n      \"command\": \"npx\",\n      \"args\": [\"mcp-gsheets@latest\"],\n      \"env\": {\n        \"GOOGLE_PROJECT_ID\": \"your-project-id\",\n        \"GOOGLE_APPLICATION_CREDENTIALS\": \"/absolute/path/to/service-account-key.json\"\n      }\n    }\n  }\n}\n```\n\n</details>\n\n<details>\n  <summary>Claude Desktop</summary>\n\nAdd to your Claude Desktop config:\n- macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`\n- Windows: `%APPDATA%\\Claude\\claude_desktop_config.json`\n- Linux: `~/.config/claude/claude_desktop_config.json`\n\n```json\n{\n  \"mcpServers\": {\n    \"mcp-gsheets\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"mcp-gsheets@latest\"],\n      \"env\": {\n        \"GOOGLE_PROJECT_ID\": \"your-project-id\",\n        \"GOOGLE_APPLICATION_CREDENTIALS\": \"/absolute/path/to/service-account-key.json\"\n      }\n    }\n  }\n}\n```\n\n</details>\n\n<details>\n  <summary>Cursor</summary>\n\nGo to `Cursor Settings` → `MCP` → `New MCP Server`. Use the config provided above.\n\n</details>\n\n<details>\n  <summary>Cline</summary>\n\nFollow https://docs.cline.bot/mcp/configuring-mcp-servers and use the config provided above.\n\n</details>\n\n<details>\n  <summary>Other MCP Clients</summary>\n\nFor other MCP clients, use the standard configuration format shown above. Ensure the `command` is set to `npx` and include the environment variables for Google Cloud authentication.\n\n</details>\n\n### Google Cloud Setup\n\n1. Go to [Google Cloud Console](https://console.cloud.google.com)\n2. Create a new project or select existing\n3. Enable Google Sheets API:\n   - Navigate to \"APIs & Services\" → \"Library\"\n   - Search for \"Google Sheets API\" and click \"Enable\"\n4. Create Service Account:\n   - Go to \"APIs & Services\" → \"Credentials\"\n   - Click \"Create Credentials\" → \"Service Account\"\n   - In the service accounts list, click the three dots in the `Actions` column → `Manage keys` → `Add key` → `Create new key` → select JSON format\n   - Download the JSON key file\n5. Share your spreadsheets:\n   - Open your Google Sheet\n   - Click Share and add the service account email (from JSON file)\n   - Grant \"Editor\" permissions\n\n### Alternative Authentication Methods\n\n#### Option 1: JSON String Authentication\n\nInstead of using a file path for credentials, you can provide the service account credentials directly as a JSON string. This is useful for containerized environments, CI/CD pipelines, or when you want to avoid managing credential files.\n\n```json\n{\n  \"mcpServers\": {\n    \"mcp-gsheets\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"mcp-gsheets@latest\"],\n      \"env\": {\n        \"GOOGLE_PROJECT_ID\": \"your-project-id\",\n        \"GOOGLE_SERVICE_ACCOUNT_KEY\": \"{\\\"type\\\":\\\"service_account\\\",\\\"project_id\\\":\\\"your-project\\\",\\\"private_key_id\\\":\\\"...\\\",\\\"private_key\\\":\\\"-----BEGIN PRIVATE KEY-----\\\\n...\\\\n-----END PRIVATE KEY-----\\\\n\\\",\\\"client_email\\\":\\\"...@....iam.gserviceaccount.com\\\",\\\"client_id\\\":\\\"...\\\",\\\"auth_uri\\\":\\\"https://accounts.google.com/o/oauth2/auth\\\",\\\"token_uri\\\":\\\"https://oauth2.googleapis.com/token\\\",\\\"auth_provider_x509_cert_url\\\":\\\"https://www.googleapis.com/oauth2/v1/certs\\\",\\\"client_x509_cert_url\\\":\\\"...\\\"}\"\n      }\n    }\n  }\n}\n```\n\n**Note**: When using `GOOGLE_SERVICE_ACCOUNT_KEY`:\n- The entire JSON must be on a single line\n- All quotes must be escaped with backslashes\n- Newlines in the private key must be represented as `\\\\n`\n- If the JSON includes a `project_id`, you can omit `GOOGLE_PROJECT_ID`\n\n#### Option 2: Private Key Authentication (Simplified)\n\nFor the most user-friendly approach, you can provide just the private key and email directly. This is the simplest method and requires only two fields from your service account JSON:\n\n```json\n{\n  \"mcpServers\": {\n    \"mcp-gsheets\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"mcp-gsheets@latest\"],\n      \"env\": {\n        \"GOOGLE_PRIVATE_KEY\": \"-----BEGIN PRIVATE KEY-----\\\\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCgR6bvMNOUHZ29\\\\n+YgbVHAXsT/s+L/jnXTCB193zikCzspSBSfxLu8VRDjkNq9WUoDxizTATzMFNvNf\\\\n...\\\\n-----END PRIVATE KEY-----\\\\n\",\n        \"GOOGLE_CLIENT_EMAIL\": \"spreadsheet@your-project.iam.gserviceaccount.com\"\n      }\n    }\n  }\n}\n```\n\n**Note**: When using `GOOGLE_PRIVATE_KEY`:\n- Newlines in the private key should be represented as `\\\\n`\n- The private key must include the `-----BEGIN PRIVATE KEY-----` and `-----END PRIVATE KEY-----` markers\n- The client email should be the service account email from your JSON file\n- `GOOGLE_PROJECT_ID` is optional when using this method\n\n## Local Development Setup\n\nIf you want to develop or contribute to this project, you can clone and build it locally:\n\n```bash\n# Clone the repository\ngit clone https://github.com/freema/mcp-gsheets.git\ncd mcp-gsheets\n\n# Install dependencies\nnpm install\n\n# Build the project\nnpm run build\n```\n\n### Interactive Setup Script\n\nRun the interactive setup script to configure your local MCP client:\n\n```bash\nnpm run setup\n```\n\nThis will:\n- Guide you through the configuration\n- Automatically detect your Node.js installation (including nvm)\n- Find your Claude Desktop config\n- Create the proper JSON configuration\n- Optionally create a .env file for development\n\n### Manual Local Configuration\n\nIf you prefer manual configuration with a local build, add to your MCP client config:\n\n```json\n{\n  \"mcpServers\": {\n    \"mcp-gsheets\": {\n      \"command\": \"node\",\n      \"args\": [\"/absolute/path/to/mcp-gsheets/dist/index.js\"],\n      \"env\": {\n        \"GOOGLE_PROJECT_ID\": \"your-project-id\",\n        \"GOOGLE_APPLICATION_CREDENTIALS\": \"/absolute/path/to/service-account-key.json\"\n      }\n    }\n  }\n}\n```\n\n## 📦 Build & Development\n\n### Development Commands\n\n```bash\n# Development mode with hot reload\nnpm run dev\n\n# Build for production\nnpm run build\n\n# Type checking\nnpm run typecheck\n\n# Clean build artifacts\nnpm run clean\n\n# Run MCP inspector for debugging\nnpm run inspector\n\n# Run MCP inspector in development mode\nnpm run inspector:dev\n```\n\n### Task Runner (Alternative)\n\nIf you have [Task](https://taskfile.dev) installed:\n\n```bash\n# Install dependencies\ntask install\n\n# Build the project\ntask build\n\n# Run in development mode\ntask dev\n\n# Run linter\ntask lint\n\n# Format code\ntask fmt\n\n# Run all checks\ntask check\n```\n\n### Development Setup\n\n1. Create `.env` file for testing:\n```bash\ncp .env.example .env\n# Edit .env with your credentials:\n# GOOGLE_PROJECT_ID=your-project-id\n# GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account.json\n# TEST_SPREADSHEET_ID=your-test-spreadsheet-id\n```\n\n2. Run in development mode:\n```bash\nnpm run dev  # Watch mode with auto-reload\n```\n\n## 🎚️ Reducing context cost with toolsets\n\nAll 44 tools together cost about **9,900 tokens of context in every session**,\nbefore the model does anything. Most workflows need a fraction of that.\n`GSHEETS_TOOLSETS` limits which tools the server exposes:\n\n```json\n{\n  \"mcpServers\": {\n    \"gsheets\": {\n      \"command\": \"npx\",\n      \"args\": [\"mcp-gsheets\"],\n      \"env\": {\n        \"GOOGLE_PROJECT_ID\": \"your-project-id\",\n        \"GOOGLE_APPLICATION_CREDENTIALS\": \"/path/to/key.json\",\n        \"GSHEETS_TOOLSETS\": \"core,charts\"\n      }\n    }\n  }\n}\n```\n\n| Toolset | Tools | What it covers |\n|---|---|---|\n| `core` | 11 | Read/write values, metadata, sheet structure, create spreadsheet |\n| `sheets` | 9 | Sheet lifecycle, rows and columns |\n| `formatting` | 15 | Colours, borders, merges, conditional rules, links, dates |\n| `charts` | 3 | Create, update, delete charts |\n| `tables` | 4 | Native tables |\n| `analysis` | 2 | Full-sheet snapshot, range comparison |\n\nMeasured `tools/list` cost:\n\n| Configuration | Tools | ≈ Tokens |\n|---|---|---|\n| _unset_ (default, all toolsets) | 44 | 9,875 |\n| `GSHEETS_TOOLSETS=core` | 11 | 1,986 |\n| `GSHEETS_TOOLSETS=core,sheets` | 20 | 3,548 |\n| `GSHEETS_READ_ONLY=true` | 16 | 3,599 |\n| `GSHEETS_TOOLSETS=core` + read-only | 6 | 912 |\n\nNotes:\n\n- **The default is unchanged** — leave `GSHEETS_TOOLSETS` unset and you get\n  every tool, exactly as before.\n- **`core` is always included.** `GSHEETS_TOOLSETS=charts` means \"charts as\n  well as core\", not \"charts only\" — without core the server cannot read a cell.\n- **A typo is a startup error**, not a silently smaller tool list.\n- `GSHEETS_READ_ONLY=true` drops every writing tool and can be combined with\n  `GSHEETS_TOOLSETS`. It is enforced when a tool is called, not just when the\n  list is built, so a client cannot write by naming a hidden tool.\n\nAll tools also carry MCP annotations (`readOnlyHint`, `destructiveHint`,\n`idempotentHint`), so clients can skip confirmation prompts on reads and warn\nbefore destructive operations.\n\n## 📋 Available Tools\n\n### Reading Data\n\n| Tool | Description | Key Parameters |\n|------|-------------|----------------|\n| `sheets_get_values` | Read cell values from a single range | `spreadsheetId`, `range` (A1 notation), `valueRenderOption` |\n| `sheets_batch_get_values` | Read cell values from multiple ranges in one request | `spreadsheetId`, `ranges` (array of A1 ranges) |\n| `sheets_get_metadata` | Get spreadsheet metadata: title, locale, sheets list with IDs, row/column counts | `spreadsheetId` |\n| `sheets_check_access` | Verify that the service account can access a spreadsheet | `spreadsheetId` |\n\n### Writing Data\n\n| Tool | Description | Key Parameters |\n|------|-------------|----------------|\n| `sheets_update_values` | Write values to a single range (overwrites existing content) | `spreadsheetId`, `range`, `values` (2D array), `valueInputOption` |\n| `sheets_batch_update_values` | Write values to multiple ranges in one request | `spreadsheetId`, `data` (array of `{range, values}`), `valueInputOption` |\n| `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` |\n| `sheets_clear_values` | Clear all values in a range (preserves formatting) | `spreadsheetId`, `range` |\n| `sheets_insert_rows` | Insert blank or pre-filled rows at a specific position | `spreadsheetId`, `range` (anchor), `rows`, `position` (BEFORE/AFTER), `values` |\n| `sheets_delete_columns` | Delete one or more columns using a full-column A1 range | `spreadsheetId`, `range` (e.g. `Sheet1!B:D`) |\n| `sheets_delete_rows` | Delete one or more rows using a full-row A1 range | `spreadsheetId`, `range` (e.g. `Sheet1!2:4`) |\n| `sheets_insert_link` | Insert a hyperlink formula into a cell | `spreadsheetId`, `range`, `url`, `label` |\n| `sheets_insert_date` | Insert a date/datetime value formatted correctly into a cell | `spreadsheetId`, `range`, `date`, `format` |\n\n### Sheet Management\n\n| Tool | Description | Key Parameters |\n|------|-------------|----------------|\n| `sheets_create_spreadsheet` | Create a new Google Sheets file | `title`, `sheets` (optional initial sheet configs) |\n| `sheets_insert_sheet` | Add a new sheet tab to an existing spreadsheet | `spreadsheetId`, `title`, `index` |\n| `sheets_delete_sheet` | Remove a sheet tab by its numeric sheet ID | `spreadsheetId`, `sheetId` |\n| `sheets_duplicate_sheet` | Copy a sheet within the same spreadsheet | `spreadsheetId`, `sheetId`, `newSheetName`, `insertSheetIndex` |\n| `sheets_copy_to` | Copy a sheet to a different spreadsheet | `spreadsheetId`, `sheetId`, `destinationSpreadsheetId` |\n| `sheets_update_sheet_properties` | Rename a sheet, change tab colour, toggle grid lines, etc. | `spreadsheetId`, `sheetId`, `properties` |\n| `sheets_batch_delete_sheets` | Delete multiple sheet tabs in one request | `spreadsheetId`, `sheetIds` (array) |\n\n### Cell Formatting\n\n| Tool | Description | Key Parameters |\n|------|-------------|----------------|\n| `sheets_format_cells` | Apply background colour, font style, alignment and number format to a range | `spreadsheetId`, `range`, `format` |\n| `sheets_batch_format_cells` | Apply different formats to multiple ranges in one request | `spreadsheetId`, `requests` (array of `{range, format}`) |\n| `sheets_update_borders` | Set or remove borders on a range (style, width, colour per side) | `spreadsheetId`, `range`, `borders` |\n| `sheets_merge_cells` | Merge a range of cells | `spreadsheetId`, `range`, `mergeType` (MERGE_ALL / MERGE_COLUMNS / MERGE_ROWS) |\n| `sheets_unmerge_cells` | Unmerge previously merged cells in a range | `spreadsheetId`, `range` |\n| `sheets_add_conditional_formatting` | Add a conditional formatting rule (gradient or boolean) to a range | `spreadsheetId`, `range`, `rule` |\n\n### Native Tables\n\n| Tool | Description | Key Parameters |\n|------|-------------|----------------|\n| `sheets_add_table` | Create a native Google Sheets table with typed columns and optional dropdown values | `spreadsheetId`, `sheetName`, `range`, `name`, `columns` |\n| `sheets_update_table` | Update an existing native Google Sheets table by table ID using an explicit field mask | `spreadsheetId`, `tableId`, `fields`, `name`, `range`, `columns` |\n| `sheets_delete_table` | Delete a native Google Sheets table by table ID | `spreadsheetId`, `tableId` |\n| `sheets_get_tables` | Read native tables for a spreadsheet or a specific sheet | `spreadsheetId`, `sheetName` |\n\n### Charts\n\n| Tool | Description | Key Parameters |\n|------|-------------|----------------|\n| `sheets_create_chart` | Create a bar, line, pie, column or other chart on a sheet | `spreadsheetId`, `sheetId`, `chartSpec`, `position` |\n| `sheets_update_chart` | Modify an existing chart's spec or position | `spreadsheetId`, `chartId`, `chartSpec`, `position` |\n| `sheets_delete_chart` | Remove a chart from a spreadsheet | `spreadsheetId`, `chartId` |\n\n### Read / Snapshot Tools\n\n| Tool | Description | Key Parameters |\n|------|-------------|----------------|\n| `sheets_get_merged_cells` | Return all merged cell ranges for a sheet, with A1 notation and raw GridRange coordinates | `spreadsheetId`, `sheetName` |\n| `sheets_get_sheet_dimensions` | Return column widths, row heights, frozen column/row counts, and hidden flags for every column and row | `spreadsheetId`, `sheetName` |\n| `sheets_get_sheet_formatting` | Read raw cell formatting (background colour, font, borders, alignment, number format) for a range without returning cell values | `spreadsheetId`, `range` |\n| `sheets_get_conditional_formatting` | Read all conditional formatting rules and banded (alternating-colour) ranges defined on a sheet | `spreadsheetId`, `sheetName` |\n| `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` |\n| `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` |\n| `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` |\n| `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` |\n| `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` |\n\n## 🔧 Code Quality\n\n### Linting\n\n```bash\n# Run ESLint\nnpm run lint\n\n# Fix auto-fixable issues\nnpm run lint:fix\n```\n\n### Formatting\n\n```bash\n# Check formatting with Prettier\nnpm run format:check\n\n# Format code\nnpm run format\n```\n\n### Type Checking\n\n```bash\n# Run TypeScript type checking\nnpm run typecheck\n```\n\n## ❗ Troubleshooting\n\n### Common Issues\n\n**\"Authentication failed\"**\n- If using file-based auth: Verify JSON key path is absolute and correct\n- If using JSON string auth: Ensure JSON is properly escaped and valid\n- If using private key auth: Check that the private key includes BEGIN/END markers and newlines are escaped as `\\\\n`\n- Verify GOOGLE_CLIENT_EMAIL is a valid service account email\n- Check GOOGLE_PROJECT_ID matches your project (or is included in JSON for full JSON auth)\n- Ensure Sheets API is enabled\n\n**\"Permission denied\"**\n- Share spreadsheet with service account email\n- Service account needs \"Editor\" role\n- Check email in JSON file (client_email field)\n\n**\"Spreadsheet not found\"**\n- Verify spreadsheet ID from URL\n- Format: `https://docs.google.com/spreadsheets/d/[SPREADSHEET_ID]/edit`\n\n**MCP Connection Issues**\n- Ensure you're using the built version (`dist/index.js`)\n- Check that Node.js path is correct in Claude Desktop config\n- Look for errors in Claude Desktop logs\n- Use `npm run inspector` to debug\n\n## 🔍 Finding IDs\n\n### Spreadsheet ID\nFrom the URL:\n```\nhttps://docs.google.com/spreadsheets/d/1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms/edit\n                                        ↑ This is the spreadsheet ID\n```\n\n### Sheet ID\nUse `sheets_get_metadata` to list all sheets with their IDs.\n\n## 📝 Tips\n\n1. Always test with a copy of your data\n2. Use batch operations for better performance\n3. Set appropriate permissions (read-only vs edit)\n4. Check rate limits for large operations\n5. Use `sheets_check_access` to verify permissions before operations\n\n## 📘 Tool Details\n\n### sheets_get_sheet_structure\n\nReturns lightweight structural/dimensional metadata for a sheet without any per-cell data. Much faster and cheaper than `sheets_get_full_sheet_snapshot` when you only need layout information.\n\n**Parameters:**\n- `spreadsheetId` (required): The ID of the spreadsheet\n- `sheetName` (required): Name of the sheet (tab)\n\n**Returns:** `sheetName`, `sheetId`, `sheetIndex`, `tabColor`, `tabColorStyle`, `dimensions` (`rowCount`, `columnCount`), `frozen` (`rowCount`, `columnCount`), `columnWidths` (array of pixel sizes), `rowHeights` (array of pixel sizes), `hiddenColumns` (0-based indices), `hiddenRows` (0-based indices), `mergeCount`, `merges` (A1 notation array)\n\n---\n\n### sheets_get_formatting_compact\n\nRead cell formatting for a range and return it as compact A1Range → format pairs. Adjacent cells with identical formatting are collapsed into rectangular ranges (run-length encoded), reducing output by 90 %+ compared to per-cell data.\n\n**Parameters:**\n- `spreadsheetId` (required): The ID of the spreadsheet\n- `sheetName` (required): Name of the sheet (tab)\n- `range` (required): Range without sheet prefix, e.g. `\"A1:Z85\"`\n- `useEffectiveFormat` (optional): `false` (default) = userEnteredFormat (only explicit overrides, smaller output); `true` = effectiveFormat (all inherited defaults)\n- `fields` (optional): Array of format field names to include, e.g. `[\"backgroundColor\", \"textFormat\", \"borders\"]`\n\n**Returns:** `{ range, formatType, rangeCount, data: { \"A1:C3\": { backgroundColor: {...} }, ... } }`\n\n**Supported fields:** `backgroundColor`, `backgroundColorStyle`, `textFormat`, `horizontalAlignment`, `verticalAlignment`, `wrapStrategy`, `textRotation`, `numberFormat`, `padding`, `borders`\n\n---\n\n### sheets_get_full_sheet_snapshot\n\nMaster one-shot tool that returns all structural and formatting metadata in a single API call.\n\n**Parameters:**\n- `spreadsheetId` (required): The ID of the spreadsheet\n- `sheetName` (required): Name of the sheet (tab)\n- `includeFormattingRange` (optional): If provided (e.g. `\"A1:Z100\"`), per-cell formatting is included in the response\n- `useEffectiveFormat` (optional): Use effectiveFormat instead of userEnteredFormat when including cell formatting (default: `false`)\n- `fields` (optional): Array of format field names to return, e.g. `[\"backgroundColor\", \"textFormat\"]` — reduces API transfer size and response size\n- `compactMode` (optional): When `true`, identical adjacent cells are collapsed into rectangular ranges (RLE). Reduces a typical 85×28 sheet from ~60 000 lines to ~500 lines (default: `false`)\n\n---\n\n\n\n### sheets_insert_rows\n\nInsert new rows at a specific position in a spreadsheet with optional data.\n\n**Parameters:**\n- `spreadsheetId` (required): The ID of the spreadsheet\n- `range` (required): A1 notation anchor point where rows will be inserted (e.g., \"Sheet1!A5\")\n- `rows` (optional): Number of rows to insert (default: 1)\n- `position` (optional): 'BEFORE' or 'AFTER' the anchor row (default: 'BEFORE')\n- `inheritFromBefore` (optional): Whether to inherit formatting from the row before (default: false)\n- `values` (optional): 2D array of values to fill the newly inserted rows\n- `valueInputOption` (optional): 'RAW' or 'USER_ENTERED' (default: 'USER_ENTERED')\n\n**Examples:**\n\n```javascript\n// Insert 1 empty row before row 5\n{\n  \"spreadsheetId\": \"your-spreadsheet-id\",\n  \"range\": \"Sheet1!A5\"\n}\n\n// Insert 3 rows after row 10 with data\n{\n  \"spreadsheetId\": \"your-spreadsheet-id\",\n  \"range\": \"Sheet1!A10\",\n  \"rows\": 3,\n  \"position\": \"AFTER\",\n  \"values\": [\n    [\"John\", \"Doe\", \"john@example.com\"],\n    [\"Jane\", \"Smith\", \"jane@example.com\"],\n    [\"Bob\", \"Johnson\", \"bob@example.com\"]\n  ]\n}\n```\n\n### sheets_delete_columns\n\nDelete one or more columns from a sheet using a full-column A1 range.\n\n**Parameters:**\n- `spreadsheetId` (required): The ID of the spreadsheet\n- `range` (required): Full-column A1 range to delete (e.g., \"Sheet1!B:D\" or \"Sheet1!C:C\")\n\n**Examples:**\n\n```javascript\n// Delete columns B through D from Sheet1\n{\n  \"spreadsheetId\": \"your-spreadsheet-id\",\n  \"range\": \"Sheet1!B:D\"\n}\n\n// Delete a single column from the first sheet\n{\n  \"spreadsheetId\": \"your-spreadsheet-id\",\n  \"range\": \"C:C\"\n}\n```\n\n### sheets_delete_rows\n\nDelete one or more rows from a sheet using a full-row A1 range.\n\n**Parameters:**\n- `spreadsheetId` (required): The ID of the spreadsheet\n- `range` (required): Full-row A1 range to delete (e.g., \"Sheet1!2:4\" or \"Sheet1!3:3\")\n\n**Examples:**\n\n```javascript\n// Delete rows 2 through 4 from Sheet1\n{\n  \"spreadsheetId\": \"your-spreadsheet-id\",\n  \"range\": \"Sheet1!2:4\"\n}\n\n// Delete a single row from the first sheet\n{\n  \"spreadsheetId\": \"your-spreadsheet-id\",\n  \"range\": \"3:3\"\n}\n```\n\n## 📋 Changelog\n\nSee [CHANGELOG.md](CHANGELOG.md) for a list of changes in each version.\n\n## 🤝 Contributing\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/amazing-feature`)\n3. Run tests and linting (`npm run check`)\n4. Commit your changes (`git commit -m 'Add some amazing feature'`)\n5. Push to the branch (`git push origin feature/amazing-feature`)\n6. Open a Pull Request\n\n## 👤 Author\n\n**Tomáš Grásl** - [tomasgrasl.cz](https://www.tomasgrasl.cz/)\n\n## 📄 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n",
  "bytes": 25595,
  "sha": "d626d4101a16ef2fbd0058e4be713f564b750a4e8b52699f836d8c4c35cff9df",
  "repo_slug": "freema/mcp-gsheets",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_freema_mcp_gsheets_f55b90ed/readme"
}