Write implementation model
write_modelWrite changes of the implementation model into this instance — create, change and delete application groups, applications, categories, edit forms, view pages, controls, database queries and scripts. Read the current model with get_model first. Every item of the three arrays is an object {id, key, changes}, where key names the kind of the entity and changes holds its changed properties — either as a plain object {"name": "…", "dbName": "…"}, which is the shorter form and the one to prefer, or as an array [{"key": "name", "value": "…"}, …]; both are accepted; a newly created entity carries a temporary negative id, which the other items reference and which is resolved while the changes are written. The arrays are applied in the order insert, update, delete and the call stops at the first item that fails — the error then reports how many items were already written and the temporary ids resolved so far (an error after all items were written carries no item key), so that the written ones are not sent again. An item of the delete array with key picker and the id of a control removes the picker of that control — its column assignments are deleted, the query and the picker settings of the control stay. In the text of a RichText control the image placeholders returned by get_model are replaced back with the images of the stored text, in the order they appear; when the text contains placeholders and their number does not match, the write is refused instead of losing the images; a text without placeholders is written as it is and removes the images. An item the server deliberately did not apply — an entity the token owner may not change, or a query sent on its own with its id in the delete array (a query is detached by "dataSource": null on its control) — is listed with its reason in the skipped array of the answer, while the other items are written. User groups and rights groups cannot be deleted here.
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": "write_model"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| delete | No | Array of the entities to delete, identified by the id returned by get_model. | |
| insert | No | Array of the entities to create; a temporary negative id is assigned to each of them. | |
| update | No | Array of the entities to change, identified by the id returned by get_model. |