update_script_content
Replace all files in an Apps Script project. Pass the complete list of files; any file not included is deleted. Always fetch the current project first.
Instructions
Write files into an Apps Script project (replacing the full set).
Side effect: this is a full replace of the project's files — any
file NOT included in files is deleted. Always fetch via
get_script_project first, modify the set, and pass the complete
list back. Requires the script.projects OAuth scope.
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>",
"files": "<files>"
},
"name": "update_script_content"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| user_google_email | Yes | The user's Google email address (authenticated account). | |
| script_id | Yes | Target project ID. | |
| files | Yes | Complete list of file objects. Each dict needs: - "name" (str): file name without extension. - "type" (str): "SERVER_JS", "HTML", or "JSON" (the "JSON" type is only valid for the manifest file named "appsscript"). - "source" (str): full text content. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |