notebook_save
Save a notebook as an .ipynb file in the SQL folder or to SAS Viya by reference, with overwrite and version-conflict handling to prevent unintended changes.
Instructions
Save a notebook (nbformat 4 JSON) as a .ipynb file in the SQL folder, or on SAS Viya by its ref.
SAS Viya (``name`` a ``sas-content://`` / ``sas-server://`` ref; SAS Content stores it as
``application/x-ipynb+json``): ``expected_version`` is the version the notebook opened; a newer one on Viya
answers ``conflict`` (nothing written), an existing file on Save as ``exists``, a ref of another connection
``connection_mismatch`` (``use_active`` saves it to the same path on the active connection) - as the SQL
Editor's Save does.
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": {
"name": "<name>",
"notebook": "<notebook>"
},
"name": "notebook_save"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| notebook | Yes | ||
| overwrite | No | ||
| use_active | No | ||
| expected_version | No |