Skip to content

Make workspace selection discoverable to MCP clients#17

Open
kevingil wants to merge 1 commit into
render-oss:mainfrom
kevingil:improve-workspace-selection-discoverability
Open

Make workspace selection discoverable to MCP clients#17
kevingil wants to merge 1 commit into
render-oss:mainfrom
kevingil:improve-workspace-selection-discoverability

Conversation

@kevingil
Copy link
Copy Markdown

When a tool returned ErrNoWorkspace, the message told the model to "prompt the user" but never named list_workspaces / select_workspace, so models that hit the error often concluded no such tool existed and stalled.

Two changes:

  1. Rewrite ErrNoWorkspace to spell out the recovery path (list_workspaces -> ask user -> select_workspace -> retry) and explain why the model must not auto-select.

  2. Pass server.WithInstructions on the MCP server so the workspace flow is in the host's system context from session start, before any workspace-gated tool is attempted.

When a tool returned ErrNoWorkspace, the message told the model to "prompt
the user" but never named list_workspaces / select_workspace, so models
that hit the error often concluded no such tool existed and stalled.

Two changes:

  1. Rewrite ErrNoWorkspace to spell out the recovery path
     (list_workspaces -> ask user -> select_workspace -> retry) and
     explain why the model must not auto-select.

  2. Pass server.WithInstructions on the MCP server so the workspace
     flow is in the host's system context from session start, before
     any workspace-gated tool is attempted.
@kevingil
Copy link
Copy Markdown
Author

Relates to issue #16

@kevingil
Copy link
Copy Markdown
Author

kevingil commented May 10, 2026

Not sure if the new serverInstructions is too much. Updated ErrNoWorkspace might be all we need.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant