Cotlet: save an automation
cotlet_automation_saveSaves a tested script as an automation on a schedule, or with automation as its new version. Show the user the rows, schedule and cost first. A script with writes waits until the user allows them in the console: give them the link this answers.
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": {
"name": "<name>",
"script": "<script>",
"schedule": "<schedule>",
"explain": "<explain>"
},
"name": "cotlet_automation_save"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Short name, e.g. Lotto monitor. | |
| note | No | For a new version: what changed, one line. | |
| script | Yes | The Python script: `def run(ctx):` with the cotlet SDK (see the guide). | |
| explain | Yes | How it works, for the user: {summary: 1-3 plain sentences, nodes: [{id, kind: trigger|read|ai|write|output|step, label, site?}], edges: [[from, to, label?]]}. A write node for every ctx.write. | |
| outputs | No | Where new rows go besides the dataset: {email: off|each_run|daily, email_hour: 0-23, webhook_url: https URL or null}. Default: email off. | |
| schedule | Yes | Cron (*/15 * * * *) or words: every 15 minutes, every 2 hours, daily at 8:00. | |
| automation | No | The automation's id from cotlet_automation_list. |