Save the final edit of a draft
save_editSave the user's FINAL edited version of a generated draft. Call this when the user has finished editing a draft (in conversation or elsewhere) and is happy with it — the diff against the original feeds ScriptGrain's closed-loop voice learning, so future drafts in that profile improve. Needs a generation with status 'drafted' (an 'outline' id has no draft to diff against); afterwards its status is 'edited'. Optional voice_rating (1-5): how well the ORIGINAL draft matched their voice. Saving again for the same generation replaces the previous edit. Free.
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": {
"generation_id": "<generation_id>",
"final_text": "<final_text>"
},
"name": "save_edit"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| final_text | Yes | The user's final version of the text. | |
| voice_rating | No | User's 1-5 rating of how well the original draft matched their voice. | |
| generation_id | Yes | The generation the user edited. |