-
-
Notifications
You must be signed in to change notification settings - Fork 117
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Description
When sending a jsonrpc to the server with type read_cell
, the response contains the source code with one-char per line. Is this desired behavior or it is a bug?
{
"jsonrpc": "2.0",
"id": 11,
"result": {
"content": [
{
"type": "text",
"text": "{\n \"index\": 0,\n \"type\": \"code\",\n \"source\": [\n \"i\",\n \"m\",\n \"p\",\n \"o\",\n \"r\",\n \"t\",\n \" \",\n \"n\",\n \"u\",\n \"m\",\n \"p\",\n \"y\",\n \" \",\n \"a\",\n \"s\",\n \" \",\n \"n\",\n \"p\",\n \"\\n\",\n \"i\",\n \"m\",\n \"p\",\n \"o\",\n \"r\",\n \"t\",\n \" \",\n \"m\",\n \"a\",\n \"t\",\n \"p\",\n \"l\",\n \"o\",\n \"t\",\n \"l\",\n \"i\",\n \"b\",\n \".\",\n \"p\",\n \"y\",\n \"p\",\n \"l\",\n \"o\",\n \"t\",\n \" \",\n \"a\",\n \"s\",\n \" \",\n \"p\",\n \"l\",\n \"t\"\n ],\n \"outputs\": []\n}"
}
],
"structuredContent": {
"index": 0,
"type": "code",
"source": [
"i",
"m",
"p",
"o",
"r",
"t",
" ",
"n",
"u",
"m",
"p",
"y",
" ",
"a",
"s",
" ",
"n",
"p",
"\n",
"i",
"m",
"p",
"o",
"r",
"t",
" ",
"m",
"a",
"t",
"p",
"l",
"o",
"t",
"l",
"i",
"b",
".",
"p",
"y",
"p",
"l",
"o",
"t",
" ",
"a",
"s",
" ",
"p",
"l",
"t"
],
"outputs": []
},
"isError": false
}
}
Reproduce
-
Start a jupyter server and start a kernel with doc
a.ipynb
, add a new cell (cell with index 0) with the following content and execute itimport numpy as np import matplotlib.pyplot as plt
-
Directly run
jupyter-mcp-server start --transport=stdio --start-new-runtime=False | tee mcp.log
with the environment variables set correctly -
In the stdin of
jupyter-mcp-server
, type the following (can copy and paste) to{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"manual-client","version":"1.0.0"}}} {"jsonrpc":"2.0","method":"notifications/initialized"} {"jsonrpc":"2.0","id":11,"method":"tools/call","params":{"name":"read_cell","arguments":{"cell_index":0}}}
-
run
tail -n1 mcp.log | jq
to see the output
Expected behavior
The source field of the output should show the source code in lines
Context
- Datalayer version:
datalayer_pycrdt 0.12.17
- Operating System and version: ubuntu
- Browser and version:
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working