script_edit_function
Modify a specific function's source code in Google Apps Script without affecting other parts of the script. Use this tool to update individual functions while maintaining script integrity.
Instructions
Replace a specific function's source code. Only that function is modified.
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": {
"script_id": "<script_id>",
"function_name": "<function_name>",
"new_source": "<new_source>"
},
"name": "script_edit_function"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| script_id | Yes | ||
| function_name | Yes | ||
| new_source | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |