The enrichment protocol is a tool-call contract built directly into the MSSQL MCP Server. When the server detects that a database object has only an auto-mechanical baseline insight — a server-generated placeholder withDocumentation 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.
LlmModel = "auto-mechanical" and Confidence = 0.30 — it embeds a mandatory directive in the introspection response that requires the calling agent to upgrade the cache entry before producing its final answer to the user. This contract is identified as MCP-Insight-Enrichment-v1 and is enforced through structured fields in the response payload, not through a separate handshake.
Trigger signals
An enrichment obligation is active whenever ANY of the following appear in a response fromDescribeTable, DescribeView, or GetObject:
| Signal | Location in response | Meaning |
|---|---|---|
_agentDirective | top-level string | Human-readable mandatory instruction naming the target object |
pendingEnrichments | top-level array | List of { tool, target, objectType, reason } items to process |
insightEnrichment.required | nested bool | true — the obligation is explicitly set |
enrichmentSuggested | top-level bool | true — shorthand flag indicating a baseline row was returned |
Enrichment steps
Call UpsertInsight for the primary object
Use the object in
insightEnrichment.nextAction.args as your call template. Replace every <fill in: ...> placeholder with real values derived from the metadata returned in the same introspection response — column names, indexes, foreign keys, row counts, definition text, and anything else that conveys the object’s actual purpose and structure.Do not pass llmModel="auto-mechanical" — that is the placeholder value you are replacing. Do not pass confidence <= 0.30 — the whole point of this call is to increase confidence above that threshold. A typical authored insight uses confidence: 0.85.Introspect and enrich related objects
For each entry in
insightEnrichment.relatedObjectsToIntrospect, call the matching introspection tool:DescribeTablefor tablesDescribeViewfor viewsGetObject(with the appropriateobjectType) for stored procedures, functions, or triggers
Why this matters
Auto-mechanical baselines are confidence 0.30 placeholders. They exist solely to give the cache something for the next agent session — a row is better than no row. But they contain no domain knowledge: the description is a template string, the business purpose is a boilerplate sentence, and the data patterns field holds rawsys.* metadata as JSON.
If an agent skips the enrichment loop, the SchemaInsights row stays at LlmModel = "auto-mechanical" and Confidence = 0.30 indefinitely. Every future agent that introspects the same object will see enrichmentSuggested = true again and re-investigate the object from scratch, spending the same tokens all over again. The cache never improves.
When enrichment is performed correctly, the next agent session finds a Fresh insight with real authored context and skips the re-investigation entirely.
insightEnrichment block fields
The insightEnrichment object in the introspection response contains the following fields:
| Field | Type | Value / Description |
|---|---|---|
required | bool | Always true when the block is present |
priority | string | "MUST" |
protocol | string | "MCP-Insight-Enrichment-v1" |
reason | string | Human-readable explanation naming the model and current confidence |
contract | string | Explicit statement of the tool-call obligation for the primary object |
consequenceOfSkipping | string | Description of the cache degradation that results from skipping |
instructions | array of strings | Numbered steps describing the enrichment procedure |
completionCriteria | string | The condition that satisfies the obligation (see Note below) |
relatedObjectsToIntrospect | array of strings | Qualified names of related objects that also need introspection |
nextAction.tool | string | Always "UpsertInsight" |
nextAction.args | object | Pre-filled UpsertInsight parameters with <fill in: ...> placeholders |
UpsertInsight args template
ThenextAction.args object is constructed server-side from the baseline row and looks like this. Every <fill in: ...> field must be replaced with real authored content before the call is made:
objectType, schemaName, and objectName are already populated from the baseline row. The relatedObjects field is also pre-filled with the JSON array of related object names parsed from the baseline. The fields marked <fill in: ...> must be replaced; passing the placeholder strings through to the database will produce a misleading insight row and leave the obligation technically unfulfilled.
The
completionCriteria field states exactly when the obligation is satisfied: the AIInsights.SchemaInsights row for the object must have LLMModel != 'auto-mechanical' and Confidence > 0.30. You can verify this with GetInsight after upserting, or by checking insightFreshness = "Fresh" on the next introspection call.