LSP Commands [[lsp_commands: Category]]Category
Custom LSP server commands. These commands execute on the LSP server side and can be invoked programmatically via the LSP protocol.
Dump Index [[cmd_dump_index: Command]]CommandDump Index McpTool 88%Query Category 76%index Command 76%
Outputs the workspace index contents for debugging.
- parser: Rust Parser
Description [[description: text]]textRun SQL Query ExtCommand 86%Query SQL McpTool 84%Run Query from Block ExtCommand 80%
Displays:
- List of all workspaces with their root paths
- Number of files in each workspace
- List of all objects with their Kind and location
- Open documents in the editor
Useful for:
- Debugging workspace indexing issues
- Verifying that objects are correctly recognized
- Diagnosing broken links
Syntax [[syntax: text]]textGet Tree McpTool 79%Tree McpResource 77%Views NarrativeDoc 75%
# VS Code Command Palette:
# Ctrl+Shift+P → "QMDC: Dump Index"
# Result displayed in the Output panel
Examples [[examples: text]]textViews NarrativeDoc 84%Hover LSPFeature 80%Workspace Parse Command 79%
=== QMDC Workspace Index ===
Workspace: 'docs'
Root: /path/to/project/docs
Files: 25
Objects (142):
- users [Table] in storage/tables.qmd.md
- orders [Table] in storage/tables.qmd.md
- completion [LSPFeature] in lsp/completion.qmd.md
...
=== Open Documents ===
Document: file:///path/to/file.qmd.md
Objects: 5
- my_object [Component]
- another_object [Service]
Get Workspace Tree [[cmd_get_workspace_tree: Command]]CommandGet Tree McpTool 87%Tree McpResource 82%Views NarrativeDoc 79%
Returns the workspace object tree for UI display. Used by the VS Code extension for the Objects Explorer.
- parser: Rust Parser
Description [[description: text]]text
Returns a tree of workspace objects grouped by the specified mode.
Syntax [[syntax: text]]text
const tree = await client.sendRequest('workspace/executeCommand', {
command: 'qmdc.getWorkspaceTree',
arguments: ['namespace'] // mode: 'namespace' | 'file' | 'smart'
});
Options [[options: text]]textRun SQL Query ExtCommand 78%Group by Namespace ExtCommand 77%Query SQL McpTool 75%
| Parameter | Type | Description |
|---|---|---|
mode |
string | Grouping mode: namespace (by namespace), file (by files), smart (smart parent-child hierarchy) |
Examples [[examples: text]]text
{
"nodes": [
{
"id": "users",
"label": "Users",
"kind": "Table",
"file": "storage/tables.qmd.md",
"line": 15,
"children": []
}
]
}
Run SQL Query [[cmd_run_sql_query: Command]]CommandRun SQL Query ExtCommand 95%Query SQL McpTool 92%Query Category 87%
Executes a SQL query against the workspace database. Used by the VS Code extension for "Run SQL Query" and "Run Query from Block" commands.
- parser: Rust Parser
Description [[description: text]]text
Executes a SQL query against the workspace SQLite database and returns the results.
Syntax [[syntax: text]]text
# VS Code Command Palette:
# Ctrl+Shift+P → "QMDC: Run SQL Query"
# Enter SQL query
# Result displayed in the Output panel
Options [[options: text]]text
| Parameter | Type | Description |
|---|---|---|
query |
string | SQL query to execute |
Examples [[examples: text]]text
-- All objects of type LSPFeature
SELECT __id, __label FROM objects WHERE __kind = 'LSPFeature'
-- Incoming references to an object
SELECT source_id, source_field FROM edges WHERE target_id = 'users'
-- Statistics by Kind
SELECT __kind, COUNT(*) as count FROM objects GROUP BY __kind
Response format:
{
"columns": ["__id", "__label"],
"rows": [
["completion", "Completion"],
["hover", "Hover"],
["definition", "Go to Definition"]
]
}