Save an edit session to the library
save_to_librarySave the sprite from a SpriteForge edit session (from open_editor, open_sprite_in_editor, or an edit link the user pasted) into the user's library. A session opened from a library sprite updates that sprite (its previous version is kept in its history) unless as_new is true; any other session becomes a new sprite in project_id (default: the most recently used project). Saving the same session again updates the sprite it created.
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>"
},
"name": "save_to_library"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Name for a new sprite (default: the session's name). | |
| as_new | No | Save as a new sprite even if the session came from a library sprite. | |
| project_id | No | Project for a new sprite (default: the most recently used project). | |
| session_id | Yes | The session_id, or an edit link containing ?s=<id>. |