Data Processing
Turn .ipynb into a # %% Python script and detect out-of-order, hidden, and deleted state
Call this tool from your code in three languages.
# 1) Request a presigned URL → returns { uploadUrl, storageKey }
curl -X POST 'https://api.elysiatools.com/api/upload/presign/jupyter-notebook-to-reproducible-script-linearizer' \
-H 'Content-Type: application/json' \
-d '{"filename":"notebookFile.ext","contentType":"application/octet-stream","size":12345}'
# 2) PUT the file bytes directly to the presigned uploadUrl
curl -X PUT '<presigned uploadUrl>' \
--data-binary @/path/to/file.ext
# 3) Call the tool, passing the returned storageKey for each file field
curl -X POST 'https://api.elysiatools.com/en/api/tools/jupyter-notebook-to-reproducible-script-linearizer' \
-F 'notebookInput={"nbformat":4,"cells":[{"cell_type":"code","execution_count":2,"source":["print(model)"]},{"cell_type":"code","execution_count":1,"source":["import numpy as np\nmodel = np.random.rand(3)"]}]}' \
-F 'notebookFile=uploads/2026/01/01/your-tool-1700000000000-abc123.ext' \
-F 'cellOrder=execution' \
-F 'includeMarkdown=true'Send a POST request with your inputs as JSON. File parameters require a separate upload first.
POST https://api.elysiatools.com/en/api/tools/jupyter-notebook-to-reproducible-script-linearizer| Name | Type | Required | Description |
|---|---|---|---|
| notebookInput | textarea | No | — |
| notebookFile | fileupload required | No | — |
| cellOrder | select | No | — |
| includeMarkdown | checkbox | No | — |
Text result
{
"result": "Processed text content",
"error": "Error message (optional)",
"message": "Notification message (optional)",
"metadata": {
"key": "value"
}
}Add this tool to your Model Context Protocol server so AI agents can list and call it.
Add this block to your MCP client configuration:
{
"mcpServers": {
"elysiatools-jupyter-notebook-to-reproducible-script-linearizer": {
"name": "jupyter-notebook-to-reproducible-script-linearizer",
"description": "Turn .ipynb into a # %% Python script and detect out-of-order, hidden, and deleted state",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=jupyter-notebook-to-reproducible-script-linearizer",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}After connecting to the SSE endpoint, list the exposed tools:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Invoke the tool by its id, passing arguments built from its parameters:
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "jupyter-notebook-to-reproducible-script-linearizer",
"arguments": {
"notebookInput": "{\"nbformat\":4,\"cells\":[{\"cell_type\":\"code\",\"execution_count\":2,\"source\":[\"print(model)\"]},{\"cell_type\":\"code\",\"execution_count\":1,\"source\":[\"import numpy as np\\nmodel = np.random.rand(3)\"]}]}",
"notebookFile": "https://example.com/file.ext",
"cellOrder": "execution",
"includeMarkdown": true
}
}
}Questions or issues? Contact [email protected]