Get model history
get_model_historyReturn the change history of a script, of a database query or of the code of an HTML or JavaScript control as JSON, read-only — the saved versions, newest first, each with its history id, date, the user who saved it and the complete text as it was after that save. A script is returned as a text listing of its steps, a query as a text listing of its definition, the code of a control verbatim. Address the object by the ids returned by get_model: form together with event for the script of an edit form event, formcontrol for an edit form control, viewpagecontrol for a view page control, query for a database query (the id of a dataSource, valuesQuery or of any other query object — returned only without depth 'structure'). An HTML or JavaScript control returns the history of its code, any other control the history of its script (typically a Button). A version is recorded whenever the script, the query or the code is saved with a change, in the designer as well as by write_model; an empty value means that the script or the code was removed. Compare neighbouring versions to find out what a change did; total tells how many versions exist and more whether older ones follow.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_model_history"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| form | No | Edit form id as returned by get_model. Together with event it addresses the script of an edit form event. | |
| event | No | Event of the edit form, required with form: onBeforeOpen, onAfterOpen, onBeforeSave, onAfterSave, onBeforeDelete or onAfterDelete — the keys of the scripts in get_model. | |
| limit | No | Optional maximum number of returned versions, 1 to 50. Defaults to 10. | |
| query | No | Id of a database query as returned by get_model. | |
| before | No | Optional history id: only versions older than it are returned. Pass the id of the oldest returned version to read further back. | |
| formcontrol | No | Id of an edit form control as returned by get_model. | |
| viewpagecontrol | No | Id of a view page control as returned by get_model. |