Skip to content

feat(tools): Add window management tools #4

Closed

Description

@CalvinAllen

Description

Implement window management MCP tools to allow AI assistants to interact with Visual Studio windows.

Tools to Implement

window_list (ReadOnly)

List all open windows (both document and tool windows).

Returns: List of WindowInfo objects with:

  • Caption - Window title
  • Kind - "Document" or "Tool"
  • IsVisible - Whether the window is currently visible
  • ObjectKind - The window's GUID (for reference)

window_activate

Activate/focus a specific window by caption/name.

Parameters:

  • caption (string) - The window caption to activate

toolwindow_show

Show a tool window by well-known name. Accepts a predefined friendly name mapped to View.* DTE commands.

Parameters:

  • name (string) - Well-known tool window name

Supported tool windows:

Name DTE Command
SolutionExplorer View.SolutionExplorer
ErrorList View.ErrorList
Output View.Output
TeamExplorer View.TeamExplorer
Terminal View.Terminal
TaskList View.TaskList
Properties View.PropertiesWindow
Toolbox View.Toolbox
FindResults View.FindResults1
Bookmarks View.BookmarkWindow

Returns the list of supported names if given an invalid one.

toolwindow_hide

Hide/close a tool window by caption.

Parameters:

  • caption (string) - The tool window caption to hide

VS APIs

  • DTE2.Windows - Enumerate windows
  • Window.Activate() - Focus a window
  • Window.Close() - Hide/close a window
  • DTE2.ExecuteCommand() - Show tool windows via View.* commands

Implementation Notes

  • Use friendly names instead of GUIDs for toolwindow_show (AI assistants can reason about names, not GUIDs)
  • Map well-known names to DTE commands internally
  • Return helpful error with list of valid names when an invalid name is provided
  • Window kind detection: use Window.Kind or Window.ObjectKind to distinguish document vs tool windows

Activity

  1. self-assigned this
    on Jan 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions