@mutallip/google-workspace-mcp 0.0.0-stage → 2.8.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 (105) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +353 -2
  3. package/README.npm.md +34 -0
  4. package/auth/__init__.py +1 -0
  5. package/auth/auth_info_middleware.py +419 -0
  6. package/auth/client_secrets.py +76 -0
  7. package/auth/credential_store.py +598 -0
  8. package/auth/external_oauth_provider.py +369 -0
  9. package/auth/gateway_identity.py +164 -0
  10. package/auth/google_auth.py +1550 -0
  11. package/auth/google_oauth_provider.py +20 -0
  12. package/auth/mcp_session_middleware.py +95 -0
  13. package/auth/oauth21_session_store.py +1332 -0
  14. package/auth/oauth_callback_server.py +466 -0
  15. package/auth/oauth_config.py +693 -0
  16. package/auth/oauth_proxy_config.py +122 -0
  17. package/auth/oauth_responses.py +230 -0
  18. package/auth/oauth_types.py +92 -0
  19. package/auth/permissions.py +330 -0
  20. package/auth/port_resolver.py +153 -0
  21. package/auth/request_identity.py +89 -0
  22. package/auth/scopes.py +369 -0
  23. package/auth/service_decorator.py +1109 -0
  24. package/bin/google-workspace-mcp.cjs +123 -0
  25. package/core/__init__.py +1 -0
  26. package/core/api_enablement.py +108 -0
  27. package/core/attachment_storage.py +496 -0
  28. package/core/camel_case_middleware.py +98 -0
  29. package/core/cli.py +161 -0
  30. package/core/comments.py +609 -0
  31. package/core/config.py +57 -0
  32. package/core/context.py +43 -0
  33. package/core/file_limits.py +632 -0
  34. package/core/gcs_attachment_storage.py +253 -0
  35. package/core/http_utils.py +339 -0
  36. package/core/log_formatter.py +270 -0
  37. package/core/portable_schema_middleware.py +67 -0
  38. package/core/server.py +1192 -0
  39. package/core/startup_ui.py +239 -0
  40. package/core/storage.py +23 -0
  41. package/core/telemetry.py +194 -0
  42. package/core/tool_descriptions.py +19 -0
  43. package/core/tool_registry.py +311 -0
  44. package/core/tool_tier_loader.py +197 -0
  45. package/core/tool_tiers.yaml +179 -0
  46. package/core/toolset_header_middleware.py +67 -0
  47. package/core/utils.py +1537 -0
  48. package/core/valkey_storage.py +271 -0
  49. package/core/warning_filters.py +19 -0
  50. package/fastmcp_server.py +198 -0
  51. package/gappsscript/README.md +512 -0
  52. package/gappsscript/TESTING.md +254 -0
  53. package/gappsscript/__init__.py +0 -0
  54. package/gappsscript/apps_script_tools.py +1940 -0
  55. package/gcalendar/__init__.py +1 -0
  56. package/gcalendar/calendar_helpers.py +1323 -0
  57. package/gcalendar/calendar_tools.py +2252 -0
  58. package/gchat/__init__.py +7 -0
  59. package/gchat/chat_helpers.py +410 -0
  60. package/gchat/chat_tools.py +798 -0
  61. package/gcontacts/__init__.py +1 -0
  62. package/gcontacts/contacts_helpers.py +765 -0
  63. package/gcontacts/contacts_tools.py +1685 -0
  64. package/gdocs/__init__.py +0 -0
  65. package/gdocs/docs_anchors.py +163 -0
  66. package/gdocs/docs_comments.py +89 -0
  67. package/gdocs/docs_helpers.py +2201 -0
  68. package/gdocs/docs_links.py +87 -0
  69. package/gdocs/docs_markdown.py +828 -0
  70. package/gdocs/docs_markdown_writer.py +592 -0
  71. package/gdocs/docs_plain_text.py +463 -0
  72. package/gdocs/docs_structure.py +621 -0
  73. package/gdocs/docs_tables.py +425 -0
  74. package/gdocs/docs_tools.py +3300 -0
  75. package/gdocs/managers/__init__.py +18 -0
  76. package/gdocs/managers/batch_operation_manager.py +1694 -0
  77. package/gdocs/managers/header_footer_manager.py +526 -0
  78. package/gdocs/managers/table_operation_manager.py +488 -0
  79. package/gdocs/managers/validation_manager.py +1504 -0
  80. package/gdocs/operation_schemas.py +594 -0
  81. package/gdrive/__init__.py +0 -0
  82. package/gdrive/drive_helpers.py +1738 -0
  83. package/gdrive/drive_tools.py +3085 -0
  84. package/gforms/__init__.py +3 -0
  85. package/gforms/forms_tools.py +575 -0
  86. package/gmail/__init__.py +1 -0
  87. package/gmail/gmail_helpers.py +2107 -0
  88. package/gmail/gmail_tools.py +4895 -0
  89. package/gmail/gmail_web_mime.py +441 -0
  90. package/gsearch/__init__.py +0 -0
  91. package/gsearch/search_tools.py +253 -0
  92. package/gsheets/__init__.py +31 -0
  93. package/gsheets/sheets_helpers.py +2236 -0
  94. package/gsheets/sheets_tools.py +3280 -0
  95. package/gslides/__init__.py +0 -0
  96. package/gslides/slides_digest.py +390 -0
  97. package/gslides/slides_helpers.py +392 -0
  98. package/gslides/slides_markup.py +770 -0
  99. package/gslides/slides_tools.py +376 -0
  100. package/gtasks/__init__.py +5 -0
  101. package/gtasks/tasks_tools.py +936 -0
  102. package/main.py +1170 -0
  103. package/package.json +43 -4
  104. package/pyproject.toml +173 -0
  105. package/uv.lock +2504 -0
@@ -0,0 +1,512 @@
1
+ # Google Apps Script MCP Tools
2
+
3
+ This module provides Model Context Protocol (MCP) tools for interacting with Google Apps Script API, enabling AI agents to create, manage, and execute Apps Script projects programmatically.
4
+
5
+ ## Overview
6
+
7
+ Google Apps Script allows automation and extension of Google Workspace applications. This MCP integration provides 11 focused tools across core and extended tiers for complete Apps Script lifecycle management. Most management tools take an `action` argument that selects the operation.
8
+
9
+ ## Why Apps Script?
10
+
11
+ Apps Script is the automation glue of Google Workspace. While individual service APIs (Docs, Sheets, Gmail) operate on single resources, Apps Script enables:
12
+
13
+ - **Cross-app automation** - Orchestrate workflows across Sheets, Gmail, Calendar, Forms, and Drive
14
+ - **Persistent logic** - Host custom business rules inside Google's environment
15
+ - **Scheduled execution** - Run automations on time-based or event-driven triggers
16
+ - **Advanced integration** - Access functionality not available through standard APIs
17
+
18
+ This MCP integration allows AI agents to author, debug, deploy, and operate these automations end-to-end - something not possible with individual Workspace APIs alone.
19
+
20
+ ### What This Enables
21
+
22
+ | Without Apps Script MCP | With Apps Script MCP |
23
+ |------------------------|---------------------|
24
+ | Read/update Sheets, Docs, Gmail individually | Create long-lived automations across services |
25
+ | No persistent automation logic | Host business logic that executes repeatedly |
26
+ | Manual workflow orchestration | Automated multi-step workflows |
27
+ | No execution history | Debug via execution logs and status |
28
+ | No deployment versioning | Manage deployments and roll back versions |
29
+
30
+ ### Complete Workflow Example
31
+
32
+ **Scenario:** Automated weekly report system
33
+
34
+ ```
35
+ User: "Create a script that runs every Monday at 9 AM. It should:
36
+ 1. Read data from the 'Sales' spreadsheet
37
+ 2. Calculate weekly totals and growth percentages
38
+ 3. Generate a summary with the top 5 performers
39
+ 4. Email the report to team@company.com
40
+ 5. Log any errors to a monitoring sheet"
41
+ ```
42
+
43
+ The AI agent:
44
+ 1. Creates a new Apps Script project
45
+ 2. Generates the complete automation code
46
+ 3. Deploys the script
47
+ 4. Sets up the time-based trigger
48
+ 5. Tests execution and monitors results
49
+
50
+ All through natural language - no JavaScript knowledge required.
51
+
52
+ ### AI Agent Workflow Pattern
53
+
54
+ The MCP client typically follows this pattern when working with Apps Script:
55
+
56
+ 1. **Inspect** - Read existing script code and project structure
57
+ 2. **Analyze** - Understand current functionality and identify issues
58
+ 3. **Propose** - Generate code changes or new functionality
59
+ 4. **Update** - Modify files atomically with complete version control
60
+ 5. **Execute** - Run functions to test changes
61
+ 6. **Deploy** - Create versioned deployments for production use
62
+ 7. **Monitor** - Check execution logs and debug failures
63
+
64
+ This ensures safe, auditable automation management.
65
+
66
+ ## Features
67
+
68
+ ### Project Management
69
+ - List all Apps Script projects
70
+ - Get complete project details including all files
71
+ - Create new standalone or bound script projects
72
+ - Update script content (add/modify JavaScript files)
73
+ - Delete script projects
74
+
75
+ ### Execution
76
+ - Execute functions with parameters
77
+ - Development mode for testing latest code
78
+ - Production deployment execution
79
+ - View execution history and status
80
+
81
+ ### Deployment Management
82
+ - Create new deployments
83
+ - List all deployments for a project
84
+ - Update deployment configurations
85
+ - Delete outdated deployments
86
+
87
+ ### Version Management
88
+ - List all versions of a script
89
+ - Create immutable version snapshots
90
+ - Get details of specific versions
91
+
92
+ ### Monitoring & Analytics
93
+ - View recent script executions
94
+ - Check execution status and results
95
+ - Monitor for errors and failures
96
+ - Get execution metrics (active users, total executions, failures)
97
+
98
+ ### Trigger Code Generation
99
+ - Generate Apps Script code for time-based triggers (minutes, hours, daily, weekly)
100
+ - Generate code for event triggers (onOpen, onEdit, onFormSubmit, onChange)
101
+ - Provides ready-to-use code snippets with setup instructions
102
+
103
+ ## Limitations & Non-Goals
104
+
105
+ **Current Limitations**
106
+ - Triggers cannot be created directly via API. The current user's existing triggers can be listed and deleted with `manage_script_trigger`; this requires an API Executable deployment, and its default development mode requires the project owner. To create one, generate the setup code with `generate_trigger_code`, add it with `manage_script_content`, and run it with `run_script_function`.
107
+ - Real-time debugging and breakpoints are not available
108
+ - Advanced service enablement must be done manually in the script editor
109
+
110
+ **Non-Goals**
111
+ - This integration does not replace the Apps Script editor UI
112
+ - Does not execute arbitrary JavaScript outside defined script functions
113
+ - Does not provide IDE features like autocomplete or syntax highlighting
114
+
115
+ **Workarounds**
116
+ - Triggers: Use `generate_trigger_code` to get ready-to-use Apps Script code for any trigger type
117
+ - Advanced services can be enabled via the manifest file (appsscript.json)
118
+ - Debugging is supported through execution logs, metrics, and error monitoring
119
+
120
+ ## Prerequisites
121
+
122
+ ### 1. Google Cloud Project Setup
123
+
124
+ Before using the Apps Script MCP tools, configure your Google Cloud project:
125
+
126
+ **Step 1: Enable Required APIs**
127
+
128
+ Enable these APIs in your Google Cloud Console:
129
+
130
+ 1. [Apps Script API](https://console.cloud.google.com/flows/enableapi?apiid=script.googleapis.com) (required for all operations)
131
+ 2. [Google Drive API](https://console.cloud.google.com/flows/enableapi?apiid=drive.googleapis.com) (required for listing projects)
132
+
133
+ **Step 2: Create OAuth Credentials**
134
+
135
+ 1. Go to [APIs & Services > Credentials](https://console.cloud.google.com/apis/credentials)
136
+ 2. Click "Create Credentials" > "OAuth client ID"
137
+ 3. Select "Desktop application" as the application type
138
+ 4. Download the JSON file and save as `client_secret.json`
139
+
140
+ **Step 3: Configure OAuth Consent Screen**
141
+
142
+ 1. Go to [OAuth consent screen](https://console.cloud.google.com/apis/credentials/consent)
143
+ 2. Add yourself as a test user (required for unverified apps)
144
+ 3. Add the required scopes (see below)
145
+
146
+ ### 2. OAuth Scopes
147
+
148
+ The following OAuth scopes are required:
149
+
150
+ ```
151
+ https://www.googleapis.com/auth/script.projects
152
+ https://www.googleapis.com/auth/script.projects.readonly
153
+ https://www.googleapis.com/auth/script.deployments
154
+ https://www.googleapis.com/auth/script.deployments.readonly
155
+ https://www.googleapis.com/auth/script.processes
156
+ https://www.googleapis.com/auth/script.metrics
157
+ https://www.googleapis.com/auth/script.external_request
158
+ https://www.googleapis.com/auth/script.scriptapp
159
+ https://www.googleapis.com/auth/drive
160
+ ```
161
+
162
+ These are automatically requested when using the appscript tool tier.
163
+
164
+ ### 3. Running the MCP Server
165
+
166
+ Start the server with Apps Script tools enabled:
167
+
168
+ ```bash
169
+ uv run main.py --tools appscript --single-user
170
+ ```
171
+
172
+ Or include with other tools:
173
+
174
+ ```bash
175
+ uv run main.py --tools appscript drive sheets
176
+ ```
177
+
178
+ On first use, you will be prompted to authorize the application. Complete the OAuth flow in your browser.
179
+
180
+ ## Tool Tiers
181
+
182
+ ### Core Tier
183
+ Essential operations for reading, writing, and executing scripts:
184
+
185
+ - `get_script_project`: Read projects - `action="list"`, or `action="get"` with an optional `file_name`
186
+ - `manage_script_project`: Project mutations - `action="create"` or `action="delete"`
187
+ - `manage_script_content`: Update source files - `action="update"` (merge or replace; `merge=true` by default)
188
+ - `run_script_function`: Execute functions
189
+ - `generate_trigger_code`: Generate trigger setup code
190
+
191
+ ### Extended Tier
192
+ Advanced deployment, versioning, and monitoring:
193
+
194
+ - `list_script_deployments`: List deployments and their bound versions
195
+ - `manage_deployment`: Deployment mutations - `action` is `create`, `update`, or `delete`
196
+ - `get_script_version`: Immutable versions - `action="list"` or `action="get"`
197
+ - `manage_script_version`: Create an immutable version - `action="create"`
198
+ - `get_script_activity`: Observability - `action="processes"` (execution history) or `action="metrics"` (execution analytics)
199
+ - `manage_script_trigger`: Current user's installable triggers - `action="list"` or `action="delete"`
200
+
201
+ ## Usage Examples
202
+
203
+ ### List Projects
204
+
205
+ ```python
206
+ # List all Apps Script projects
207
+ uv run main.py --tools appscript
208
+ # In MCP client: "Show me my Apps Script projects"
209
+ ```
210
+
211
+ Example output:
212
+ ```
213
+ Found 3 Apps Script projects:
214
+ - Email Automation (ID: abc123) Created: 2025-01-10 Modified: 2026-01-12
215
+ - Sheet Processor (ID: def456) Created: 2025-06-15 Modified: 2025-12-20
216
+ - Form Handler (ID: ghi789) Created: 2024-11-03 Modified: 2025-08-14
217
+ ```
218
+
219
+ ### Create New Project
220
+
221
+ ```python
222
+ # Create a new Apps Script project
223
+ # In MCP client: "Create a new Apps Script project called 'Data Sync'"
224
+ ```
225
+
226
+ Example output:
227
+ ```
228
+ Created Apps Script project: Data Sync
229
+ Script ID: new123
230
+ Edit URL: https://script.google.com/d/new123/edit
231
+ ```
232
+
233
+ ### Get Project Details
234
+
235
+ ```python
236
+ # Get complete project with all files
237
+ # In MCP client: "Show me the code for script abc123"
238
+ ```
239
+
240
+ Example output:
241
+ ```
242
+ Project: Email Automation (ID: abc123)
243
+ Creator: user@example.com
244
+ Created: 2025-01-10
245
+ Modified: 2026-01-12
246
+
247
+ Files:
248
+ 1. Code.gs (SERVER_JS)
249
+ function sendDailyEmail() {
250
+ var sheet = SpreadsheetApp.getActiveSpreadsheet();
251
+ // ... email logic
252
+ }
253
+
254
+ 2. appsscript.json (JSON)
255
+ {"timeZone": "America/New_York", "dependencies": {}}
256
+ ```
257
+
258
+ ### Update Script Content
259
+
260
+ ```python
261
+ # Update script files
262
+ # In MCP client: "Update my email script to add error handling"
263
+ ```
264
+
265
+ The AI will:
266
+ 1. Read current code
267
+ 2. Generate improved version
268
+ 3. Call `manage_script_content(action="update")` with the changed files (`merge=true` merges by file name)
269
+
270
+ To delete files or replace the entire project, pass `merge=false` with the complete desired file set.
271
+
272
+ ### Run Script Function
273
+
274
+ ```python
275
+ # Execute a function
276
+ # In MCP client: "Run the sendDailyEmail function in script abc123"
277
+ ```
278
+
279
+ Example output:
280
+ ```
281
+ Execution successful
282
+ Function: sendDailyEmail
283
+ Result: Emails sent to 5 recipients
284
+ ```
285
+
286
+ ### Create Deployment
287
+
288
+ ```python
289
+ # Deploy script for production
290
+ # In MCP client: "Deploy my email automation to production"
291
+ ```
292
+
293
+ Example output:
294
+ ```
295
+ Created deployment for script: abc123
296
+ Deployment ID: AKfy...xyz
297
+ Description: Production release
298
+ ```
299
+
300
+ ## Common Workflows
301
+
302
+ ### 1. Create Automated Workflow (Complete Example)
303
+
304
+ **Scenario:** Form submission handler that sends customized emails
305
+
306
+ ```
307
+ User: "When someone submits the Contact Form:
308
+ 1. Get their email and department from the form response
309
+ 2. Look up their manager in the Team Directory spreadsheet
310
+ 3. Send a welcome email to the submitter
311
+ 4. Send a notification to their manager
312
+ 5. Log the interaction in the Onboarding Tracker sheet"
313
+ ```
314
+
315
+ **AI Agent Steps:**
316
+ ```
317
+ 1. "Create a new Apps Script bound to the Contact Form"
318
+ 2. "Add a function that reads form submissions"
319
+ 3. "Connect to the Team Directory spreadsheet to look up managers"
320
+ 4. "Generate personalized email templates for both messages"
321
+ 5. "Add logging to the Onboarding Tracker"
322
+ 6. "Run the function to test it with sample data"
323
+ 7. "Create a production deployment"
324
+ ```
325
+
326
+ Result: Complete automation created and deployed without writing code.
327
+
328
+ ### 2. Debug Existing Script
329
+
330
+ ```
331
+ User: "My expense tracker script is failing"
332
+ AI: "Show me the code for the expense tracker script"
333
+ AI: "What errors occurred in recent executions?"
334
+ AI: "The calculateTotal function has a division by zero error on line 23"
335
+ AI: "Fix the error by adding a check for zero values"
336
+ AI: "Run calculateTotal to verify the fix"
337
+ User: "Create a new deployment with the bug fix"
338
+ ```
339
+
340
+ ### 3. Modify and Extend Automation
341
+
342
+ ```
343
+ User: "Update my weekly report script to include sales data from the Q1 sheet"
344
+ AI: "Read the current report generation script"
345
+ AI: "Add Q1 data fetching to the generateReport function"
346
+ AI: "Test the updated function"
347
+ User: "Looks good, deploy it"
348
+ AI: "Create a new deployment with description 'Added Q1 sales data'"
349
+ ```
350
+
351
+ ### 4. Run Existing Business Logic
352
+
353
+ ```
354
+ User: "Run the monthlyCleanup function in my Data Management script"
355
+ User: "What does the calculateCommission function do?"
356
+ User: "Execute reconcileAccounts with parameters: ['2024', 'January']"
357
+ ```
358
+
359
+ ## File Types
360
+
361
+ Apps Script projects support three file types:
362
+
363
+ - **SERVER_JS**: Google Apps Script code (.gs files)
364
+ - **HTML**: HTML files for custom UIs
365
+ - **JSON**: Manifest file (appsscript.json)
366
+
367
+ ## API Limitations
368
+
369
+ ### Execution Timeouts
370
+ - Simple triggers: 30 seconds
371
+ - Custom functions: 30 seconds
372
+ - Script execution via API: 6 minutes
373
+
374
+ ### Quota Limits
375
+ - Script executions per day: varies by account type
376
+ - URL Fetch calls: 20,000 per day (consumer accounts)
377
+
378
+ See [Apps Script Quotas](https://developers.google.com/apps-script/guides/services/quotas) for details.
379
+
380
+ ### Cannot Execute Arbitrary Code
381
+ The `run_script_function` tool can only execute functions that are defined in the script. You cannot run arbitrary JavaScript code directly. To run new code:
382
+
383
+ 1. Add function to script via `manage_script_content(action="update")`
384
+ 2. Execute the function via `run_script_function`
385
+ 3. Optionally remove the function after execution
386
+
387
+ ### run_script_function Requires API Executable Deployment
388
+
389
+ The `run_script_function` tool requires additional manual configuration in the Apps Script editor:
390
+
391
+ **Why this limitation exists:**
392
+ Google requires scripts to be explicitly deployed as "API Executable" before they can be invoked via the Apps Script API. This is a security measure to prevent unauthorized code execution.
393
+
394
+ **To enable API execution:**
395
+
396
+ 1. Open the script in the Apps Script editor
397
+ 2. Go to Project Settings (gear icon)
398
+ 3. Under "Google Cloud Platform (GCP) Project", click "Change project"
399
+ 4. Enter your GCP project number (found in Cloud Console dashboard)
400
+ 5. Click "Deploy" > "New deployment"
401
+ 6. Select type: "API Executable"
402
+ 7. Set "Who has access" to "Anyone" or "Anyone with Google account"
403
+ 8. Click "Deploy"
404
+
405
+ After completing these steps, the `run_script_function` tool will work for that script.
406
+
407
+ **Note:** Project, content, deployment, version, and activity tools work without this manual step. `run_script_function` and `manage_script_trigger` require an API Executable deployment.
408
+
409
+ ## Error Handling
410
+
411
+ Common errors and solutions:
412
+
413
+ ### 404: Script not found
414
+ - Verify script ID is correct
415
+ - Ensure you have access to the project
416
+
417
+ ### 403: Permission denied
418
+ - Check OAuth scopes are authorized
419
+ - Verify you own or have access to the project
420
+
421
+ ### Execution timeout
422
+ - Script exceeded 6-minute limit
423
+ - Optimize code or split into smaller functions
424
+
425
+ ### Script authorization required
426
+ - Function needs additional permissions
427
+ - User must manually authorize in script editor
428
+
429
+ ## Security Considerations
430
+
431
+ ### OAuth Scopes
432
+ Scripts inherit the OAuth scopes of the MCP server. Functions that access other Google services (Gmail, Drive, etc.) will only work if those scopes are authorized.
433
+
434
+ ### Script Permissions
435
+ Scripts run with the permissions of the script owner, not the user executing them. Be cautious when:
436
+ - Running scripts you did not create
437
+ - Granting additional permissions to scripts
438
+ - Executing functions that modify data
439
+
440
+ ### Code Review
441
+ Always review code before executing, especially for:
442
+ - Scripts from unknown sources
443
+ - Functions that access sensitive data
444
+ - Operations that modify or delete data
445
+
446
+ ## Testing
447
+
448
+ ### Unit Tests
449
+ Run unit tests with mocked API responses:
450
+
451
+ ```bash
452
+ uv run pytest tests/gappsscript/test_apps_script_tools.py
453
+ ```
454
+
455
+ ### Manual Testing
456
+ Test against real Apps Script API:
457
+
458
+ ```bash
459
+ python tests/gappsscript/manual_test.py
460
+ ```
461
+
462
+ Note: Manual tests create real projects in your account. Delete test projects after running.
463
+
464
+ ## References
465
+
466
+ ### Apps Script Documentation
467
+ - [Apps Script Overview](https://developers.google.com/apps-script/overview) - Introduction and capabilities
468
+ - [Apps Script Guides](https://developers.google.com/apps-script/guides/services) - Service-specific guides
469
+ - [Apps Script Reference](https://developers.google.com/apps-script/reference) - Complete API reference
470
+
471
+ ### Apps Script API (for this MCP integration)
472
+ - [Apps Script API Overview](https://developers.google.com/apps-script/api) - API features and concepts
473
+ - [REST API Reference](https://developers.google.com/apps-script/api/reference/rest) - Endpoint documentation
474
+ - [OAuth Scopes](https://developers.google.com/apps-script/api/how-tos/authorization) - Required permissions
475
+
476
+ ### Useful Resources
477
+ - [Apps Script Quotas](https://developers.google.com/apps-script/guides/services/quotas) - Usage limits and restrictions
478
+ - [Best Practices](https://developers.google.com/apps-script/guides/support/best-practices) - Performance and optimization
479
+ - [Troubleshooting](https://developers.google.com/apps-script/guides/support/troubleshooting) - Common issues and solutions
480
+
481
+ ## Troubleshooting
482
+
483
+ ### "Apps Script API has not been used in project"
484
+ Enable the API in Google Cloud Console
485
+
486
+ ### "Insufficient Permission"
487
+ - Verify OAuth scopes are authorized
488
+ - Re-authenticate if needed
489
+
490
+ ### "Function not found"
491
+ - Check function name spelling
492
+ - Verify function exists in the script
493
+ - Ensure function is not private
494
+
495
+ ### "Invalid project structure"
496
+ - Ensure at least one .gs file exists
497
+ - Verify JSON files are valid JSON
498
+ - Check file names don't contain invalid characters
499
+
500
+ ## Contributing
501
+
502
+ When adding new Apps Script tools:
503
+
504
+ 1. Follow existing patterns in `apps_script_tools.py`
505
+ 2. Add comprehensive docstrings
506
+ 3. Include unit tests
507
+ 4. Update this README with examples
508
+ 5. Test against real API before submitting
509
+
510
+ ## License
511
+
512
+ MIT License - see project root LICENSE file