Browse documentation

load

[solution]

Loads a TypeScript or JavaScript workspace and clears live documents. Save intended live edits or retain their text first.

Try it locally in the TGlider playground

Parameters

NameTypeRequiredDescription
rootPathstringYesAbsolute path to the workspace root.
watchbooleanNoStart the file watcher after load. Default is true. Use true to restart a failed watcher. Default: true

Examples

Replace sample paths and symbol keys with values from your workspace.

Load a local TypeScript workspace

Arguments
{
  "rootPath": "/Users/dev/app",
  "watch": true
}
Full MCP request
Full MCP request
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "load",
    "arguments": {
      "rootPath": "/Users/dev/app",
      "watch": true
    }
  }
}

Response Notes

Returns loaded projects, skipped configs, revision, watcher state, and durationMs. The duration measures this load. To recover automatic file updates, call load with the workspace rootPath and watch=true. Check server_status afterward: watching=true and watcherError=null confirm recovery. A load with watch=false clears watcherError and leaves automatic updates disabled.