Commands  ›   ›  Snapshot Query

Snapshot Query

writes to model Public API · not yet exposed

Coming soon

Before you run this

A snapshot must have been exported via SnapshotExportCommand (snapshot_export). The SnapshotRegistry.Current must be non-null and IsReady.

After it runs

Returns JSON query results via CommandExecutor.SetResultObject. No model changes — read-only operation on the SQLite database.

When to use this

Don't use this when

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

NameKindTypeRequiredDefaultDescription
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

NameTypeDescription
QueryResultJSONQuery 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

on start
Querying model snapshot...
Running snapshot query...
Fetching data from snapshot database...
thinking
Checking snapshot availability...
Parsing query parameters...
Executing SQLite query...
Formatting results...
on success
Query returned {RowCount} rows.
on failure
Snapshot query failed: {error}

REST API

Not yet exposed

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 commandsSnapshotExportCommand
Pillar