MCP tools for Google Apps Script via the Google Workspace MCP server. All tools require user_google_email (string, required) except generate_trigger_code.
- Projects: list_script_projects, get_script_project, create_script_project, delete_script_project
- File Content: get_script_content, update_script_content
- Execution: run_script_function, generate_trigger_code
- Deployments: manage_deployment, list_deployments
- Versions: list_versions, create_version, get_version
- Monitoring: list_script_processes, get_script_metrics
- Tips
Lists Apps Script projects accessible to the user (via Drive API).
| Parameter | Type | Required | Default | Notes |
|---|---|---|---|---|
| user_google_email | string | yes | ||
| page_size | integer | no | 50 | |
| page_token | any | no | Pagination token |
Retrieves complete project details including all source files.
| Parameter | Type | Required | Default | Notes |
|---|---|---|---|---|
| user_google_email | string | yes | ||
| script_id | string | yes |
Creates a new Apps Script project.
| Parameter | Type | Required | Default | Notes |
|---|---|---|---|---|
| user_google_email | string | yes | ||
| title | string | yes | Project title | |
| parent_id | any | no | Drive folder ID or bound container ID |
Permanently deletes an Apps Script project. Cannot be undone.
| Parameter | Type | Required | Default | Notes |
|---|---|---|---|---|
| user_google_email | string | yes | ||
| script_id | string | yes |
Retrieves content of a specific file within a project.
| Parameter | Type | Required | Default | Notes |
|---|---|---|---|---|
| user_google_email | string | yes | ||
| script_id | string | yes | ||
| file_name | string | yes |
Merge or replace files in a script project. Defaults to merging supplied files by name into the existing project; set merge=false to replace the full project (omitted files are deleted).
| Parameter | Type | Required | Default | Notes |
|---|---|---|---|---|
| user_google_email | string | yes | ||
| script_id | string | yes | ||
| files | array | yes | Objects with name, type, and source |
|
| merge | boolean | no | true | true overlays updates; false replaces the entire project |
Executes a function in a deployed script.
| Parameter | Type | Required | Default | Notes |
|---|---|---|---|---|
| user_google_email | string | yes | ||
| script_id | string | yes | ||
| function_name | string | yes | ||
| parameters | any | no | List of parameters to pass | |
| dev_mode | boolean | no | false | true = run latest code; false = run deployed version |
Generates Apps Script code for creating triggers. The API cannot create triggers directly -- they must be created from within Apps Script.
| Parameter | Type | Required | Default | Notes |
|---|---|---|---|---|
| trigger_type | string | yes | One of: time_minutes, time_hours, time_daily, time_weekly, on_open, on_edit, on_form_submit, on_change |
|
| function_name | string | yes | Function to run when trigger fires | |
| schedule | string | no | "" | Depends on type: minutes (1/5/10/15/30), hours (1/2/4/6/8/12), daily (0-23), weekly (MONDAY-SUNDAY) |
Creates, updates, or deletes a deployment.
| Parameter | Type | Required | Default | Notes |
|---|---|---|---|---|
| user_google_email | string | yes | ||
| action | string | yes | create, update, or delete |
|
| script_id | string | yes | ||
| deployment_id | any | no | Required for update and delete |
|
| description | any | no | Required for create and update |
|
| version_description | any | no | For create only |
Lists all deployments for a script project.
| Parameter | Type | Required | Default | Notes |
|---|---|---|---|---|
| user_google_email | string | yes | ||
| script_id | string | yes |
Lists all immutable version snapshots of a script project.
| Parameter | Type | Required | Default | Notes |
|---|---|---|---|---|
| user_google_email | string | yes | ||
| script_id | string | yes |
Creates a new immutable version snapshot of the current script code.
| Parameter | Type | Required | Default | Notes |
|---|---|---|---|---|
| user_google_email | string | yes | ||
| script_id | string | yes | ||
| description | any | no | Version description |
Gets details of a specific version.
| Parameter | Type | Required | Default | Notes |
|---|---|---|---|---|
| user_google_email | string | yes | ||
| script_id | string | yes | ||
| version_number | integer | yes |
Lists recent execution processes for the user's scripts.
| Parameter | Type | Required | Default | Notes |
|---|---|---|---|---|
| user_google_email | string | yes | ||
| page_size | integer | no | 50 | |
| script_id | any | no | Filter by script ID |
Gets execution metrics (active users, total executions, failures) for a script project.
| Parameter | Type | Required | Default | Notes |
|---|---|---|---|---|
| user_google_email | string | yes | ||
| script_id | string | yes | ||
| metrics_granularity | string | no | "DAILY" | DAILY or WEEKLY |
Triggers: The Apps Script API cannot create triggers directly. Use generate_trigger_code to produce the code, then paste it into the script editor and run it once manually to install the trigger.
Development mode: Set dev_mode: true in run_script_function to execute the latest saved code instead of the last deployed version. This is useful during development and testing.
Deploy workflow: manage_deployment (create action) creates a version internally, so a separate create_version call is not required. Use create_version explicitly if you want a named version snapshot independent of deployment.