---
description: Check the DelphiLSP project registry — what projects are active, capabilities, common issues (license, missing .delphilsp.json, no Delphi installed).
---

Probe the LSP layer by:

1. Calling `mcp__rdbg__lsp_open_project` against the user's
   `.dproj` (or, if none was given, the project the bridge will
   walk-up to from CWD — try with no args first and surface the
   error if it can't resolve). Returns `{project,
   capabilities, project_files, active}`.
2. Format the response for the user with:

- **Active project**: `project` path; mark `active: true`.
- **Capabilities**: from `capabilities`, list which LSP methods
  the running DelphiLSP advertises. Highlight any of these that
  are missing on the user's Delphi version, with a one-line
  workaround:
  - `referencesProvider` absent → "find-references not
    advertised on this Delphi version; the `lsp_references` tool
    is hidden from `tools/list` here. Upgrade to Delphi 13.1+
    for native; otherwise fall back to `lsp_workspace_symbol` +
    grep."
  - `workspaceSymbolProvider` absent → "workspace symbol search
    available via fallback (`precision: approximate`) — slower
    on large projects."
- **Project files**: count + first 3 from `project_files`.

3. **Diagnostics — flag these specific issues if present:**
   - **License error** in any subsequent `lsp_*` call →
     "DelphiLSP license check failed; rdbg-mcp must run in your
     interactive RDP/local session. Restart Claude Code from
     there."
   - **No DelphiLSP found** → "Set `delphilsp_path` to your
     RAD Studio install's `bin64\DelphiLSP.exe` (D12+) or
     `bin\DelphiLSP.exe` (D11.3); or install RAD Studio
     Community Edition for free."
   - **No `.delphilsp.json` or `.dproj` resolvable** → "Pass an
     explicit `project=...` arg to `lsp_open_project`, or set
     `lsp_default_project` in plugin config."

Keep the output to ~12 lines. The user invokes this when they
want a quick health check of the LSP path, not exhaustive
capability dumps.
