Skip to main content
Glama

trigger_vscode_reload

Reload a Jupyter notebook in VS Code to apply changes made through the MCP Jupyter Server, ensuring the editor displays updated content.

Instructions

Trigger VS Code to reload the notebook file

Input Schema

NameRequiredDescriptionDefault
notebook_pathYesAbsolute path to the Jupyter notebook file

Input Schema (JSON Schema)

{ "properties": { "notebook_path": { "description": "Absolute path to the Jupyter notebook file", "type": "string" } }, "required": [ "notebook_path" ], "type": "object" }

Implementation Reference

  • The core handler function that updates the file's access and modification times (touches the file) to trigger VS Code's file watcher for reloading the notebook.
    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}`); } }
  • Tool schema definition in the list_tools response, specifying the input schema that requires 'notebook_path'.
    { 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)
    Registration in the CallToolRequestHandler switch statement, dispatching to VSCodeIntegration.triggerReload.
    case "trigger_vscode_reload": return await this.vscodeIntegration.triggerReload(args.notebook_path);

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/azharlabs/mcp-jupyter-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server