Problem
The MCP integration tests (test_mcp_uvx_install.py) stop at tools/list — they never call tools/call view_data. The proposed test_view_data_call test would close that gap, but even it wouldn't catch missing static assets like widget.js / standalone.js.
The view_data tool's data path (ensure_server() → Tornado → POST /load → text summary) works fine without the JS bundle. The failure only surfaces when a browser loads the session page and tries to fetch the JS. This means a broken wheel (missing static files) passes all MCP protocol tests.
How this bit us
When widget.js was missing from a fresh install, view_data appeared to work (the MCP text response came back) but the browser page it opened was blank. No test caught it.
Suggested fix
After calling tools/call view_data through the MCP protocol, also HTTP-fetch the static JS asset from the Tornado server that ensure_server() started. Something like:
- Parse the
view_data response to extract the server URL / port
GET /static/standalone.js (or whatever the entry point is)
- Assert 200 and non-empty body
This would verify the full user-visible path: MCP protocol → server startup → data load → static assets present.
Alternatively
A simpler check: after installing the wheel, assert the static file exists on disk inside the installed package directory. This is less end-to-end but faster and doesn't need a running server.
Problem
The MCP integration tests (
test_mcp_uvx_install.py) stop attools/list— they never calltools/call view_data. The proposedtest_view_data_calltest would close that gap, but even it wouldn't catch missing static assets likewidget.js/standalone.js.The
view_datatool's data path (ensure_server()→ Tornado →POST /load→ text summary) works fine without the JS bundle. The failure only surfaces when a browser loads the session page and tries to fetch the JS. This means a broken wheel (missing static files) passes all MCP protocol tests.How this bit us
When
widget.jswas missing from a fresh install,view_dataappeared to work (the MCP text response came back) but the browser page it opened was blank. No test caught it.Suggested fix
After calling
tools/call view_datathrough the MCP protocol, also HTTP-fetch the static JS asset from the Tornado server thatensure_server()started. Something like:view_dataresponse to extract the server URL / portGET /static/standalone.js(or whatever the entry point is)This would verify the full user-visible path: MCP protocol → server startup → data load → static assets present.
Alternatively
A simpler check: after installing the wheel, assert the static file exists on disk inside the installed package directory. This is less end-to-end but faster and doesn't need a running server.