Data Processing
Konvertiert .ipynb in Python mit # %% und erkennt ungeordneten, versteckten oder gelöschten Zustand
Rufen Sie dieses Werkzeug aus Ihrem Code in drei Sprachen auf.
# 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/de/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'Senden Sie eine POST-Anfrage mit Ihren Eingaben als JSON. Dateiparameter erfordern einen vorherigen Upload.
POST https://api.elysiatools.com/de/api/tools/jupyter-notebook-to-reproducible-script-linearizer| Name | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
| notebookInput | textarea | Nein | — |
| notebookFile | fileUpload nötig | Nein | — |
| cellOrder | select | Nein | — |
| includeMarkdown | checkbox | Nein | — |
Textergebnis
{
"result": "Processed text content",
"error": "Error message (optional)",
"message": "Notification message (optional)",
"metadata": {
"key": "value"
}
}Fügen Sie dieses Werkzeug Ihrem Model-Context-Protocol-Server hinzu, damit KI-Agenten es auflisten und aufrufen können.
Fügen Sie diesen Block Ihrer MCP-Client-Konfiguration hinzu:
{
"mcpServers": {
"elysiatools-jupyter-notebook-to-reproducible-script-linearizer": {
"name": "jupyter-notebook-to-reproducible-script-linearizer",
"description": "Konvertiert .ipynb in Python mit # %% und erkennt ungeordneten, versteckten oder gelöschten Zustand",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=jupyter-notebook-to-reproducible-script-linearizer",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}Nach dem Verbinden mit dem SSE-Endpunkt listen Sie die bereitgestellten Werkzeuge auf:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Rufen Sie das Werkzeug über seine ID auf; Argumente werden aus seiner Parameterliste gebildet:
{
"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
}
}
}Fragen oder Probleme? Kontakt: [email protected]