Preflight Checklist
Problem Statement
There is no tool available to a Claude Code session that can ask the connected IDE (VS Code / code-server, via the extension's own MCP/IDE channel) to perform workspace-level actions — e.g. "add this folder to the current workspace", "remove this folder", "list open workspace folders". The only IDE-adjacent tool currently exposed is LSP (code intelligence: goToDefinition, findReferences, hover, etc.) — nothing for workspace/window state.
This came up in a session where I'd split a subfolder of an existing repo into its own standalone repo, and needed to add the new location as a folder in an existing multi-root .code-workspace file. I asked "can't you just ask VS Code directly?", and the answer was no — the only available path was to locate the right .code-workspace JSON file on disk and edit its folders array directly with a text-editing tool.
That workaround has real downsides:
- It requires knowing/finding the right
.code-workspace file — not always obvious when multiple workspace files exist across synced/local paths (e.g. a repo-local copy vs. a OneDrive-synced copy).
- It bypasses the running VS Code window entirely: if the window has unsaved/in-memory workspace state, or the change needs to take effect without a manual reload, a direct file edit doesn't trigger VS Code's own
onDidChangeWorkspaceFolders handling.
- It's the kind of action a user would naturally expect their IDE assistant to just "do", the same way the extension's own "Add Folder to Workspace..." command does it live.
Proposed Solution
Expose an IDE-integration tool (via the same channel the extension already uses for the ide MCP server / lock-file protocol) that lets Claude:
addWorkspaceFolder(path) / removeWorkspaceFolder(path) — mirrors VS Code's own vscode.workspace.updateWorkspaceFolders API.
listWorkspaceFolders() — so Claude can check current state before acting instead of guessing from disk.
This would let Claude Code perform the same "add folder to workspace" action a user would do via the Command Palette, without needing to find and hand-edit the .code-workspace file — and it would take effect immediately in the running window.
Alternative Solutions
Keep editing the .code-workspace file directly on disk (current behavior). Works, but has the downsides described above.
Priority
Nice to have
Feature Category
IDE Integration
Use Case Example
- User splits a subfolder into its own repo and asks Claude to add it to the current multi-root workspace.
- Claude calls
listWorkspaceFolders() to see current state, then addWorkspaceFolder(newPath).
- VS Code updates the workspace live, no manual file edit or reload needed.
Additional Context
No response
Preflight Checklist
Problem Statement
There is no tool available to a Claude Code session that can ask the connected IDE (VS Code / code-server, via the extension's own MCP/IDE channel) to perform workspace-level actions — e.g. "add this folder to the current workspace", "remove this folder", "list open workspace folders". The only IDE-adjacent tool currently exposed is
LSP(code intelligence: goToDefinition, findReferences, hover, etc.) — nothing for workspace/window state.This came up in a session where I'd split a subfolder of an existing repo into its own standalone repo, and needed to add the new location as a folder in an existing multi-root
.code-workspacefile. I asked "can't you just ask VS Code directly?", and the answer was no — the only available path was to locate the right.code-workspaceJSON file on disk and edit itsfoldersarray directly with a text-editing tool.That workaround has real downsides:
.code-workspacefile — not always obvious when multiple workspace files exist across synced/local paths (e.g. a repo-local copy vs. a OneDrive-synced copy).onDidChangeWorkspaceFoldershandling.Proposed Solution
Expose an IDE-integration tool (via the same channel the extension already uses for the
ideMCP server / lock-file protocol) that lets Claude:addWorkspaceFolder(path)/removeWorkspaceFolder(path)— mirrors VS Code's ownvscode.workspace.updateWorkspaceFoldersAPI.listWorkspaceFolders()— so Claude can check current state before acting instead of guessing from disk.This would let Claude Code perform the same "add folder to workspace" action a user would do via the Command Palette, without needing to find and hand-edit the
.code-workspacefile — and it would take effect immediately in the running window.Alternative Solutions
Keep editing the
.code-workspacefile directly on disk (current behavior). Works, but has the downsides described above.Priority
Nice to have
Feature Category
IDE Integration
Use Case Example
listWorkspaceFolders()to see current state, thenaddWorkspaceFolder(newPath).Additional Context
No response