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.
GetObject is the unified entry point for retrieving the definition and metadata of any SQL Server programmable object. Supply an objectType and the object name, and the tool routes internally to the appropriate handler: GetStoredProc for procedures, GetFunction for scalar and table-valued functions, and GetTrigger for DML triggers. All three sub-handlers return the object’s metadata, its parameter list (where applicable), and its full T-SQL source from OBJECT_DEFINITION().
When the AI Insights layer is active, the response also includes cached insight data and enrichment instructions for each object type.
Parameters
The kind of programmable object to retrieve. Accepted canonical values and their common aliases:
Aliases are case-insensitive and ignore hyphens and underscores.
| Canonical value | Accepted aliases |
|---|---|
StoredProcedure | storedprocedures, procedure, procedures, proc, procs, sp, sps |
Function | scalarFunction, tableFunction, scalarFunctions, tableFunctions, functions, fn |
Trigger | triggers, tr |
The object name. Accepted forms depend on the object type:
- StoredProcedure / Function:
nameorschema.name(e.g.usp_GetOrderordbo.usp_GetOrder). - Trigger:
name,schema.name, or the three-part formschema.table.name(e.g.trgAudit,dbo.trgAudit, ordbo.Orders.trgAudit).
Returns
The top-level response key varies by object type (procedure, function, or trigger).
Returned when
objectType=StoredProcedure.Returned when
objectType=Function.Returned when
objectType=Trigger.Input and output parameters for stored procedures and functions. Empty array when the object has no parameters. Not present for triggers.
Full T-SQL source as returned by
OBJECT_DEFINITION(). null when the object was created WITH ENCRYPTION or the definition is otherwise unavailable.Cached AI Insights text. Present only when the Insights layer is enabled.
null when no insight has been generated.ISO 8601 timestamp of the last insight write.
null when no insight exists.true when the Insights layer recommends agent enrichment.Structured enrichment instructions (MCP-Insight-Enrichment-v1).
AI Insights enrichment protocol
Usage notes
For triggers, three-part name parsing (
schema.table.name) is handled internally by TriggerQualifiedName.Parse(). The last dot-separated segment is always treated as the trigger name, the first as the schema, and the middle segment (when present) as the table name. This allows unambiguous lookup when the same trigger name exists on tables in different schemas.GetObject covers all function subtypes (FN, TF, IF, FT in sys.objects.type). You do not need to specify whether the function is scalar or table-valued — the type_desc field in the response tells you which kind was found.