create_notebook
Generate and customize Jupyter notebooks for Python and Markdown tasks, ensuring unique names and valid JSON content for streamlined data analysis and integration with SingleStore databases.
Instructions
Create a new Jupyter notebook in your personal space. Only supports python and markdown.
Parameters:
- notebook_name (required): Name for the new notebook
- Can include or omit .ipynb extension
- Must be unique in your personal space
- content (optional): JSON object with the following structure:
{
"cells": [
{"type": "markdown", "content": "Markdown content here"},
{"type": "code", "content": "Python code here"}
]
}
- 'type' must be either 'markdown' or 'code'
- 'content' is the text content of the cell
IMPORTANT: The content must be valid JSON.
How to use:
- Before creating the notebook, call check_if_file_exists tool to verify if the notebook already exists.
- Always install the dependencies on the first cell. Example:
{
"cells": [
{"type": "code", "content": "!pip install singlestoredb --quiet"},
// other cells...
]
}
- To connect to the database, use the variable "connection_url" that already exists in the notebook platform. Example:
{
"cells": [
{"type": "code", "content": "conn = s2.connect(connection_url)"},
// other cells...
]
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | ||
| ctx | No | ||
| notebook_name | Yes |