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.

DescribeTable returns a comprehensive metadata snapshot of a single table in one round-trip: table identity, every column with its data type and extended-property description, non-primary-key indexes, key constraints (primary key and unique constraints), foreign keys including both the source and referenced column lists, and table-level triggers with their enabled state and event types. When the AI Insights layer is active it also attaches cached insight data that agents can use to avoid redundant schema investigations. Prefer DescribeTable over writing ad-hoc sys.* queries for a single table — it coalesces six catalog queries into one structured response.

Parameter

name
string
required
The table to describe. Accepts either of:
  • table_name — unqualified; the first matching table across all schemas is returned.
  • schema.table_name — schema-qualified (recommended when the same table name exists in multiple schemas).
Examples: Orders, dbo.Orders, sales.RegionalTotals.

Returns

table
object
Table identity and ownership.
columns
array
Ordered list of columns as returned by sys.columns.
indexes
array
Non-primary-key, non-unique-constraint indexes defined on the table.
constraints
array
Primary key and unique constraints from sys.key_constraints.
foreignKeys
array
Foreign key relationships in which this table is the parent (referencing) side.
triggers
array
Table-level DML triggers from sys.triggers.
insight
string | null
Cached AI Insights text for this table. Present only when the Insights layer is enabled (USE_INSIGHTS_LAYER != false). null when no insight has been generated yet.
insightFreshness
string | null
ISO 8601 timestamp of when the cached insight was last written. null when no insight exists.
enrichmentSuggested
boolean | null
true when the Insights layer determines the cached data is incomplete and the agent should enrich it. See the enrichment warning below.
insightEnrichment
object | null
Structured enrichment instructions conforming to the MCP-Insight-Enrichment-v1 protocol. Contains required, nextAction.args, and relatedObjectsToIntrospect. Present only when enrichment is needed.

AI Insights enrichment protocol

MCP-Insight-Enrichment-v1 — mandatory post-call contract. When the response contains insightEnrichment.required=true, or includes a top-level _agentDirective or pendingEnrichments field, agents must call UpsertInsight using the arguments supplied in insightEnrichment.nextAction.args (replacing every <fill in: ...> placeholder with observed values) before producing a final answer.Agents must also inspect every entry in insightEnrichment.relatedObjectsToIntrospect and complete the same enrichment loop for each related object. Skipping this step is a tool-protocol violation and leaves the insight cache stuck at a low-confidence auto-mechanical baseline (confidence 0.30).
For the full enrichment protocol specification, see the Enrichment Protocol reference page.

Example

Request

{
  "tool": "DescribeTable",
  "arguments": {
    "name": "dbo.Orders"
  }
}

Response

{
  "success": true,
  "data": {
    "table": {
      "id": 885578193,
      "name": "Orders",
      "schema": "dbo",
      "owner": "dbo",
      "type": "U",
      "description": "Customer purchase orders."
    },
    "columns": [
      {
        "name": "OrderId",
        "type": "int",
        "length": 4,
        "precision": 10,
        "scale": 0,
        "nullable": false,
        "description": "Primary key."
      },
      {
        "name": "CustomerId",
        "type": "int",
        "length": 4,
        "precision": 10,
        "scale": 0,
        "nullable": false,
        "description": null
      },
      {
        "name": "OrderDate",
        "type": "datetime2",
        "length": 8,
        "precision": 27,
        "scale": 7,
        "nullable": false,
        "description": null
      },
      {
        "name": "TotalAmount",
        "type": "decimal",
        "length": 9,
        "precision": 18,
        "scale": 2,
        "nullable": false,
        "description": null
      }
    ],
    "indexes": [
      {
        "name": "IX_Orders_CustomerId",
        "type": "NONCLUSTERED",
        "keys": "CustomerId",
        "description": null
      }
    ],
    "constraints": [
      {
        "name": "PK_Orders",
        "type": "PRIMARY_KEY_CONSTRAINT",
        "keys": "OrderId"
      }
    ],
    "foreignKeys": [
      {
        "name": "FK_Orders_Customers",
        "schema": "dbo",
        "table_name": "Orders",
        "column_name": "CustomerId",
        "referenced_schema": "dbo",
        "referenced_table": "Customers",
        "referenced_column": "CustomerId"
      }
    ],
    "triggers": [
      {
        "name": "trgOrdersAudit",
        "is_disabled": false,
        "is_instead_of_trigger": false,
        "trigger_events": "INSERT, UPDATE",
        "description": null
      }
    ],
    "insight": null,
    "insightFreshness": null,
    "enrichmentSuggested": null,
    "insightEnrichment": null
  }
}

Build docs developers (and LLMs) love