Skip to content

Conversation

@Lazysusan01
Copy link
Contributor

Issue with the validation in jupyter_mcp_server/server.py
@mcp.tool()
async def insert_execute_code_cell(
cell_index: Annotated[int, Field(description="Index of the cell to insert and execute (0-based)", ge=0)]

This prevents the index from being set to -1 , which appends the cell to the bottom of the notebook.
-Changed ge=0 to ge=-1.
-Added unit test for appending code cell in test_tools

Lazysusan01 and others added 5 commits November 18, 2025 20:00
- Update `extract_output` in `utils.py` to detect and serialize Plotly data structures into formatted JSON strings.
- Filter out non-standard `transient` fields from execution outputs to improve `nbformat` schema compliance.
- Change health check route from `/api/healthz` to `/api/health` in `server.py`.
- Add debug logging for output data keys to assist with visualization detection.
Updated cell_index parameter to allow -1 as a valid index.
Added test for appending code cell to notebook.
Copy link
Member

@echarles echarles left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM Thx @Lazysusan01

@echarles echarles merged commit db23c1c into datalayer:main Nov 26, 2025
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants