run_script_function
Execute a specified function within a Google Apps Script project. Supports passing parameters and running in developer mode for immediate code testing.
Instructions
Execute a function inside an Apps Script project.
Requires the project to have an API-executable deployment configured (Deploy > New deployment > Library/API executable). dev_mode=True runs the latest saved code without needing a fresh deployment — available only to the script's OWN Google account. For managing deployments themselves use manage_deployment. Requires the script.projects OAuth scope plus any scopes the target function needs.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"user_google_email": "<user_google_email>",
"script_id": "<script_id>",
"function_name": "<function_name>"
},
"name": "run_script_function"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| user_google_email | Yes | The user's Google email address (authenticated account). | |
| script_id | Yes | Target project ID (must have an API-executable deployment). | |
| function_name | Yes | Name of the top-level function to invoke (e.g. "doWork"). Private/internal helpers cannot be called. | |
| parameters | No | Optional positional arguments to pass to the function. Must be JSON-serializable primitives or arrays. | |
| dev_mode | No | True runs the latest saved code (owner only); False (default) runs the deployed version. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |