MCP server for Google Apps Script: CommonJS module system, ad-hoc code execution, Unix-inspired commands (cat, grep, ls), and AI-assisted development
The GAS MCP server demonstrates solid foundational quality with well-structured tool definitions and comprehensive parameter schemas. All 6 tools have explicit input schemas with proper JSON Schema format, descriptions that follow the [CONTEXT] + WHEN/AVOID pattern, and most parameters include type definitions and descriptions. Tool annotations (readOnlyHint, destructiveHint) are correctly applied. However, there are notable gaps: (1) several parameter descriptions are terse or lack actionable guidance; (2) output schemas are documented only at a high level without field-level detail for complex responses; (3) error handling strategies are not explicitly described in tool definitions; (4) some parameters accept broad types (array, object) without structural constraints. The server exceeds community median (~50) but falls short of A-grade (80+) due to incomplete output documentation and missing error recovery guidance.
[FILE:CACHE] No-op: xattr metadata cache removed. Use preferLocal:false on cat for forced remote refresh, or rsync pull for bulk refresh.
[FILE:READ] Read file content with automatic CommonJS unwrapping — returns clean user code. WHEN: reading any file to view or prepare for editing. AVOID: use raw:true to see full CommonJS _main() wrappers; use edit for modifications. Example: cat({scriptId, path: "Utils.gs"})
[EXEC] Execute any JavaScript statement in a GAS project — supports Math, Date, all GAS services (SpreadsheetApp, DriveApp, etc.), and require() for CommonJS modules. WHEN: running ad-hoc code, testing expressions, or calling module functions. AVOID: use exec_api for calling existing module functions; exec for ad-hoc code and multi-service operations. Example: exec({scriptId, js_statement: "require('Utils').process([1,2,3])"})
[EXEC:API] Call a named function with parameters via Apps Script API — structured alternative to exec. WHEN: calling exported functions with typed arguments. AVOID: use exec for ad-hoc JavaScript; exec_api for calling known module functions with structured args. Example: exec_api({scriptId, functionName: "processData", parameters: [1, 2]})
cache_clear is functionally a no-op but still exposed as a tool. Description states 'Previously: path to clear. Now unused, this tool is a no-op.' This violates the single-responsibility principle and confuses LLMs about when to call it.
Output schemas documented only at property level without nested field descriptions. E.g., 'deploy' returns an object but no schema shows what fields (dev_deployment, staging_deployment, prod_deployment?) exist within it. LLMs cannot infer the structure of complex nested responses.
Error handling strategies not described in tool definitions. E.g., exec_api and exec do not document what exceptions they throw, how to retry on transient failures, or what user-fixable errors look like (missing OAuth scope, quota exceeded, invalid function name). Agents have no recovery guidance.
Inferred effective spec: 2025-06-18+.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | C | 66 | 2025-06-18+ | v2 |
| 2026-04-07 | F | 26 | - | v1 |
[DRIVE:FIND] Search for Apps Script projects bound to Google Drive files (Sheets, Docs, Slides). WHEN: finding container-bound scripts by document name or ID. AVOID: use project_list for already-configured projects; find_drive_script for discovering unknown bound scripts. Example: find_drive_script({query: "Budget Tracker"})
[STATUS] Project health dashboard — shows sync state, lock status, git branch, uncommitted changes, and deployment info. WHEN: diagnosing issues or checking overall project state. AVOID: use ls for file listing; status for project health overview. Example: status({scriptId})
Parameters 'moduleName', 'logFilter', 'logTail' in exec_api and exec lack actionable descriptions. 'Module name for require() lookup (optional)' does not explain how to find valid module names or what happens if a module is not found. 'Optional regex to filter logger_output' does not state the regex flavor (ripgrep format is mentioned in example but not enforced by schema).
exec and exec_api accept 'parameters' as a free-form array with description 'Supports primitives (string, number, boolean), arrays, and plain objects.' No JSON Schema items constraint; LLMs could pass invalid nested structures. Should define allowed parameter types via oneOf or additionalProperties=false.
cat tool's 'path' parameter pattern is complex ('^([a-zA-Z0-9_-]{5,60}/[a-zA-Z0-9_.//-]+|[a-zA-Z0-9_.//-]+)$') but the description does not clearly state whether to use relative paths, absolute paths, or scriptId/path format. Example shows 'abc123def456.../helpers.gs' but description says 'filename only, or scriptId/filename if scriptId parameter is empty', format ambiguity invites parse errors.