Snapshot Query
Coming soon
A snapshot must have been exported via SnapshotExportCommand (snapshot_export). The SnapshotRegistry.Current must be non-null and IsReady.
Returns JSON query results via CommandExecutor.SetResultObject. No model changes — read-only operation on the SQLite database.
When to use this
- User wants to query elements by category, level, or parameter value from the snapshot.
- User wants to run raw SQL joins across elements and parameters tables.
- User wants snapshot metadata (element counts, export time, scope).
- AI sub-agents need fast parallel reads without hitting the Revit thread.
Exporting/creating a snapshot (use SnapshotExportCommand instead). Writing parameter changes (use snapshot_write/snapshot_apply instead). Live Revit model queries that need real-time data (use MCP context tools instead).
Inputs
| Name | Kind | Type | Required | Default | Description |
|---|---|---|---|---|---|
sql |
config | string |
no | null | Raw SQL query (SELECT only) |
table |
config | string |
no | null | Table to query (structured mode) |
filters |
config | string |
no | null | JSON column=value filters for structured query |
include_parameters |
config | string |
no | null | Comma-separated parameter names to join |
limit |
config | string |
no | "200" | Max rows returned |
info |
config | string |
no | null | Set to 'true' for snapshot metadata |
Returns
| Name | Type | Description |
|---|---|---|
QueryResult | JSON | Query results as JSON array or metadata object |
Decision flow
check: info == "true" → return snapshot metadata check: sql provided → validate read-only → execute raw SQL check: table provided → build structured query with filters → execute fallback: → return snapshot metadata (info)
What you'll see in the chat
Running snapshot query...
Fetching data from snapshot database...
Parsing query parameters...
Executing SQLite query...
Formatting results...
REST API
This command does not carry a [RestApi] attribute today. Once tagged, this section will auto-populate with:
POST /api/v1/commands/snapshot_query- Request body schema (from
[RestApiParam]) - Response schema (from
[RestApiResponse]) - curl / JS / Python code examples
Keywords & intent patterns
snapshot query · query snapshot · sqlite query · model snapshot query · elements query · parameters query · rooms query · levels query
Patterns: query * snapshot · snapshot * query · search * snapshot · find * in snapshot · get * from snapshot
Related
| Related commands | SnapshotExportCommand |
|---|---|
| Pillar |