Skip to main content

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.

RebuildBaselineInsights bulk-creates auto-mechanical baseline insights (confidence 0.30) for database objects that match the optional filters. Use it to warm the insights cache after a fresh InstallInsightsLayer or after large schema changes so that subsequent introspection tools have at least a placeholder row to work from. The tool scans sys.objects for user-created tables, views, stored procedures, and functions — triggers are not covered by baseline scans.

Parameters

schemaName
string
Limit the baseline scan to a single schema (e.g. dbo). Pass null to process objects across all schemas.
objectType
string
Limit the baseline scan to a single object type. Accepted values: Table, View, Procedure (aliases: Proc, StoredProcedure), Function (aliases: TVF, ScalarFunction, TableFunction). Pass null to process all supported types. Triggers are not supported and will return a validation error.
take
integer
Maximum number of objects to scan in this call. Clamped server-side to the range 1–2000. Defaults to 200. Use multiple calls with different schemaName or objectType filters to process large databases in batches.

Returns

success
boolean
required
true when the scan completed without an unhandled exception. false if auto-population is disabled or an error occurred.
data
object
Present when success is true. Contains counts of objects processed.
error
string
Present only when success is false. Contains the top-level error message, such as "Insights auto-population is disabled." when INSIGHTS_AUTOPOPULATE is not enabled.
Baselines created by this tool have LlmModel="auto-mechanical" and Confidence=0.30. They are intentionally low-quality placeholders that signal to downstream introspection tools that the insight still needs upgrading. Use UpsertInsight — or follow the enrichment protocol surfaced by DescribeTable / GetInsight — to replace them with properly authored insights.
RebuildBaselineInsights requires USE_INSIGHTS_LAYER to be enabled (the default) and the AI Insights layer to be installed via InstallInsightsLayer. When the layer is disabled, the tool returns an error without scanning any objects.
RebuildBaselineInsights also requires INSIGHTS_AUTOPOPULATE to be enabled in the server environment. If either USE_INSIGHTS_LAYER or INSIGHTS_AUTOPOPULATE is set to a falsey value, the tool returns success=false with the error "Insights auto-population is disabled.".
After installing the layer on an existing database, run RebuildBaselineInsights scoped to tables first:
{
  "objectType": "Table",
  "take": 200
}
This populates baseline rows for all user tables before your first investigation session, ensuring that DescribeTable always has a row to annotate even before any LLM-authored insight exists.

Build docs developers (and LLMs) love