Visual Studio extension that integrates Claude AI as an MCP server, providing tools for code editing, debugging, building, and screen capture within the IDE
Claude Code VS provides 18 well-structured tools with complete JSON schemas and detailed descriptions. Naming follows verb_noun conventions (openDiff, openFile, vs_build, vs_debug_state). Most tools have 50-300 character descriptions explaining purpose and context. Schemas include proper type definitions and required fields. However, several tools lack parameter descriptions (e.g., getCurrentSelection has empty properties), some descriptions are generic, and error handling guidance is minimal. Output schemas are not documented. The server is STDIO-only, which caps protocol readiness at 50 regardless of definition quality.
Close all open diff tabs in Visual Studio.
Close a diff tab in Visual Studio by its tab name.
Get the current text selection in the active editor
Get compiler diagnostics (errors and warnings) for a file or all files
Open a diff view showing proposed file changes for user acceptance or rejection
Open a file in Visual Studio with optional preview mode and line/text selection
Build the solution open in Visual Studio (or one project) with the IDE's own build, and get back structured errors and warnings: [{file, line, column, message, project}] plus the raw build log tail. Use this instead of shelling out to `dotnet build` or MSBuild: it is the build the IDE actually ran, it covers .NET Framework and C++ projects and the solution's active configuration, and it is what populates the Error List that getDiagnostics reads - so without it those diagnostics are whatever was left over from the last manual build. Pass project = a project name or the path of any file in it to build just that project. The build runs asynchronously (the IDE stays responsive); if it outlasts the timeout, call vs_build again to keep waiting for the SAME build rather than starting a second one.
getCurrentSelection has empty schema properties and minimal description (40 chars). Tool is effectively undocumented for LLM selection.
Output schemas are not documented for any tool. LLMs cannot plan downstream calls or extract required fields (e.g., what does vs_debug_state return? What fields are in the breakpoints array?).
Error handling lacks recovery guidance. Tools do not document what errors are retryable, user-fixable, or fatal. No examples of error messages or how LLM should respond.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | D | 57 | <=2025-11-25 | v2 |
Capture the screen as a PNG attachment and return its file path (then use Read on that path to view it). Defaults to the primary monitor; pass 'monitor' (0-based) for a specific one or all:true for every monitor in one image. Captures EVERYTHING visible, so prefer vs_capture_window when a single window is enough. Requires 'Allow screen capture' enabled in the Claude Code panel.
Capture a screenshot of a window as a PNG attachment and return its file path (then use Read on that path to view it). target 'debuggee' (default) captures the window of the process being debugged; 'ide' captures the Visual Studio window; 'window' captures the largest visible window whose title contains 'title' (e.g. the browser tab showing your web app - a web debuggee has no window of its own). Requires 'Allow screen capture' enabled in the Claude Code panel.
Get Visual Studio's live debugger state: whether it's paused, and if so the stop location, call stack (function names, innermost first), and the current frame's arguments and locals with their runtime values. Returns {"mode":"break|run|design|unknown", ...}. Use this to inspect actual runtime values while debugging, not just source.
Evaluate an expression in the Visual Studio debugger while paused, in the context of a chosen call-stack frame (frameIndex 0 = current). Returns {value, type, isValid}. Use it to probe values the locals don't show (e.g. 'order.Items.Count', 'a / b', 'object.ReferenceEquals(x, y)'). Break-mode only. IMPORTANT: the VS evaluator does NOT support LINQ or lambdas (e.g. 'list.Select(x => x.Foo)' returns isValid=false) - prefer simple expressions: indexing, field/property access, .Count, .Sum(), arithmetic, ReferenceEquals. Note: expressions with side effects (method calls) DO execute - there is no read-only eval. Pass threadId (from vs_threads) to evaluate on ANOTHER thread - e.g. read 'from.Id' on each thread in a deadlock.
Expand an object's structure while paused: evaluate an expression and recurse into its child members (fields/properties/elements) to a depth, returning a tree of {name,type,value,children}. Use this to inspect a complex object without guessing every member path (e.g. expand 'order' instead of evaluating 'order.Customer.Address.City' blind). Break-mode only. Pass threadId (from vs_threads) to expand on ANOTHER thread - e.g. drill 'from' on each thread in a deadlock.
Return the change timeline for a data breakpoint armed with vs_set_data_breakpoint: every change seen so far (oldest first) as structured {previous, current, type}, plus 'broke'/'breakCount'. Read-only; poll it to follow a value across a run - e.g. to find which write turned it bad, then set a normal breakpoint at that write site.
Get the arguments and local variables (with runtime values) for a specific call-stack frame while paused. frameIndex 0 is the innermost/current frame; higher indices walk up toward callers. By default reads the current/stopped thread; pass threadId (from vs_threads) to read ANOTHER thread's frame - e.g. to inspect each thread parked in a deadlock. Use vs_debug_state or vs_threads first to see the stacks. Break-mode only.
List all breakpoints set in Visual Studio (file, line, function, enabled, current hit count, and condition if any). Works even when not running, so you can see where execution will stop. Returns {"mode":..., "breakpoints":[...]}.
Read a pane of Visual Studio's Output window - text the CLI has no other way to see. pane 'debug' (the debugged app's own Console/ILogger output, first-chance exception notices, assembly-binding failures, Hot Reload messages - none of which reach a terminal under F5), 'build' (the full MSBuild log), 'general', or any other pane by name ('Tests', 'Claude Code' for this extension's own diagnostics). Returns the LAST 'tail' lines, so a long-running log costs a bounded number of tokens. Pass contains to keep only matching lines within that window.
Disarm a data breakpoint set with vs_set_data_breakpoint: stop watching/breaking and Close its engine binding. Pass the requestId. Safe to call anytime; if the debuggee is running the binding closes at the next stop. (Multiple data breakpoints can be armed at once - this removes just the one you name.)
Watch a managed INSTANCE FIELD and get notified on every change - a data breakpoint / data tracepoint that VS's UI can't set programmatically. Call while PAUSED where the owning object is in scope. 'expression' MUST be owner.field (e.g. order.Total); statics, locals and struct fields are unsupported. Each change (old->new value) is recorded - poll vs_get_data_changes with the returned requestId for the timeline. Optional 'condition' ("> 700", "== 0", "!= 5") filters; with 'stopOnChange' execution breaks on a matching change so you can inspect locals at the mutation site. Requires 'Allow Claude to drive debugger' enabled.
closeAllDiffTabs and close_tab lack clear distinction in naming. Both close tabs; naming should clarify scope (close_diff_tab vs close_all_diff_tabs) to prevent LLM confusion.
vs_capture_window and vs_capture_screen descriptions mention 'Requires Allow screen capture enabled' but do not explain what happens if permission is denied or how to enable it.