trigger_vscode_reload
Reload a Jupyter notebook file in VS Code to apply changes made through the MCP Jupyter Server, ensuring the editor displays current content.
Instructions
Trigger VS Code to reload the notebook file
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| notebook_path | Yes | Absolute path to the Jupyter notebook file |
Implementation Reference
- src/vscode-integration.js:11-29 (handler)The core handler function that implements the tool logic by touching the notebook file's utimes to trigger a VS Code reload via file watcher.async triggerReload(notebookPath) { try { // Touch the file to trigger VS Code's file watcher const stats = await fs.stat(notebookPath); const now = new Date(); await fs.utimes(notebookPath, now, now); return { content: [ { type: "text", text: `Triggered VS Code reload for: ${notebookPath}` } ] }; } catch (error) { throw new Error(`Failed to trigger reload: ${error.message}`); } }
- src/index.js:308-321 (schema)The input schema definition for the tool, registered in the ListTools response.{ name: "trigger_vscode_reload", description: "Trigger VS Code to reload the notebook file", inputSchema: { type: "object", properties: { notebook_path: { type: "string", description: "Absolute path to the Jupyter notebook file" } }, required: ["notebook_path"] } }
- src/index.js:396-397 (registration)The switch case registration that dispatches the tool call to the VSCodeIntegration handler.case "trigger_vscode_reload": return await this.vscodeIntegration.triggerReload(args.notebook_path);