script_run
Execute a function in a Google Apps Script API executable using script ID, function name, and optional parameters to control cloud-based automation.
Instructions
Run a function in a Google Apps Script project. The script must be deployed as an API executable and share the calling OAuth client's Cloud project.
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": {
"scriptId": "<scriptId>",
"functionName": "<functionName>"
},
"name": "script_run"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| devMode | No | Run the latest saved (HEAD) code instead of the deployed version. Only works for the script owner. | |
| scriptId | Yes | The ID of the script to run. | |
| parameters | No | Parameters to pass to the function (JSON-compatible values). | |
| functionName | Yes | The name of the function to execute. |