Documentation Index
Fetch the complete documentation index at: https://mintlify.com/A-Point-Systems-ltd/ms-sql-mcp/llms.txt
Use this file to discover all available pages before exploring further.
RefreshInsights triggers the DDL change processing pipeline immediately — the same logic the background InsightDdlProcessingQueue service runs automatically on a schedule. Call it to force reconciliation after a batch of schema changes, or once at the start of an investigation session to ensure the cache reflects the current database state.
Parameters
RefreshInsights takes no parameters.
What it does
RunningRefreshInsights executes the following steps in order:
- Reads new DDL audit rows — queries
dbo.DDL_AuditLogfor rows with an ID greater than the currentDdlChangeWatermarkvalue. - Archives affected insights — for each object that appears in the new DDL log rows, moves the current
AIInsights.SchemaInsightsrow toAIInsights.InsightHistoryand marks the live row as stale. - Falls back to fingerprint scanning — when no new DDL audit rows are pending (e.g. the trigger was not installed), performs a fingerprint-based scan to detect objects whose schema has changed since their insight was last authored.
- Rebuilds auto-mechanical baselines — when
INSIGHTS_AUTOPOPULATEis enabled, creates newauto-mechanicalbaseline rows for any objects whose insights were just archived. - Advances the watermark — updates
AIInsights.DdlChangeWatermarkto the highest processed audit ID so the same rows are not processed again. - Returns recent insight summaries — includes a snapshot of recently-updated insight rows in the response.
Returns
true when the pipeline ran without an unhandled exception; false on error.Present when
success is true. Contains a summary of the refresh run.Present only when
success is false. Contains the exception message.RefreshInsights requires USE_INSIGHTS_LAYER to be enabled (the default). When the layer is disabled, the tool returns an error indicating the layer is off.RefreshInsights is not idempotent — each call advances the DDL processing watermark and may archive insight rows. Calling it multiple times in quick succession is safe but redundant; the second call will find no new DDL rows and perform only a fingerprint scan.