These examples show how Claude Code uses the bridge to interact with your live IDE. Each example includes the user prompt, the bridge tools involved, and the outcome.
getActiveFile — reads the path of the file currently focused in the editor.getDiagnostics for that file — returns the live compiler errors from VS Code's language server, with exact line numbers, error codes, and messages (e.g. "TS2345: Argument of type 'string' is not assignable to parameter of type 'number'").readFile to get the current file contents.editFile — applies the changes directly in the open editor, preserving unsaved state and undo history.getDiagnostics again to confirm the error count dropped to zero.Without the bridge, Claude Code has no access to live compiler diagnostics — it can only read files from disk. The bridge exposes VS Code's Language Server Protocol output in real time, so Claude sees the same errors you see in the Problems panel, including errors in files that haven't been saved yet.
getUserById to fetchUserById everywhere
it's used across the project.
getDocumentSymbols on the file containing getUserById — locates the exact definition position.findReferences with that position — returns every call site across all project files, with file paths and line numbers, using the live LSP index.editFile for each file — applies the rename atomically, one file at a time, without touching unrelated lines.getDiagnostics project-wide to confirm no import or type errors were introduced.A naive text search would miss dynamic call patterns, miss callers in files that import via re-exports, and have no way to verify correctness. The bridge uses the actual LSP reference index — the same source of truth that powers VS Code's built-in rename refactor — so every caller is found, even across dozens of files.
runTests targeting the auth module — executes the test runner (Jest/Vitest/pytest/etc.) and returns structured results: pass/fail counts, test names, failure messages, and stack traces.readFile on the relevant source and test files to understand the implementation.> instead of >=) and writes the fix.editFile to apply the change in the editor.runTests again — confirms all tests now pass before reporting back.The bridge runs the test suite through the IDE's integrated test runner and returns machine-readable results — not raw terminal output. Claude gets structured pass/fail data it can reason over directly, and can loop: fix → re-run → verify, without any manual copy-pasting from a terminal window.
All examples require:
npm install -g claude-ide-bridge && claude-ide-bridge start-all)claude-ide-bridge gen-claude-md adds the MCP config)See the README for full setup instructions.