studio_save
Save the open page as a new version and close the session. Runs the same checks as studio_run_checks; when they fail, nothing is saved and the errors come back to you. On a change, the first save that loses functions or element ids the request does not remove is refused once, with their names; so is the first save that changes a table or a gb.storage key other pages read, with those pages. Saving publishes the version, as a change made in the studio is published: a navigation's or a list's code is written in the back office, and the app shows the page after its next publication. The answer says whether the version was published (published) and, when it was not, why and what to do (publication): tell the user. Each API host the page calls is approved for the page by the save itself. A key never passes through here: when the page needs one the studio does not have, the save is refused and says where the user gives it. Shared tables the page declares and does not have yet, and columns it adds to them, are made by the save, without asking the user: for an app with no database yet it creates the app's database first, for a new page of an app on its own Supabase project it attaches the page to that project first (studio_get (what doc) topic supabase says which). A change to entries the user already has, or to who may read or add them, in the app's own Supabase project (a field's type changed, an access rule added or changed, a table rebuilt) is never made without the user: the save answers confirmation_needed with each change and its id; show the user each one, then call studio_save again with accepted_changes. A save can take a minute: a save_pending error means the save goes on; call studio_save again with the same session_id for its outcome.
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": {
"session_id": "<session_id>",
"summary": "<summary>",
"not_done": "<not_done>"
},
"name": "studio_save"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| summary | Yes | For the user, in the user's language: one sentence saying what the page does or what changed. | |
| not_done | Yes | For the user, in the language of the request: what the request asked that the page does not do as asked. For example: sample data instead of the user's, data kept on each device instead of shared between users, a change made on this page instead of another, a version rebuilt instead of restored. Never what you did. Exactly "" when the page does all of it. | |
| session_id | Yes | The session_id studio_open_page returned. | |
| auto_accept | No | true only when the user asked you to apply changes to their saved entries without asking each time: every such change of this save is made without being listed. | |
| accepted_changes | No | The ids of the changes to the user's saved entries that the user accepted, from studio_save's confirmation_needed answer. Never an id the user did not accept. |