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.

ListObjects is the unified entry point for enumerating any category of database object in the connected SQL Server or Azure SQL Database. A single objectType argument routes to the appropriate underlying query — replacing the need to call separate per-type helpers. An optional partialName filter narrows results by a substring match on both the bare object name and the qualified schema.name form.

Parameters

objectType
string
required
The logical object category to enumerate. Accepted canonical values and their common aliases:
Canonical valueAccepted aliases
Tabletables
Viewviews
StoredProcedurestoredprocedures, procedure, procedures, proc, procs
TableFunctiontablefunctions, tvf
ScalarFunctionscalarfunctions, scalar
Functionfunctions — returns both scalar and table-valued functions with an added function_kind field (ScalarFunction or TableFunction)
TableTriggertabletriggers, triggers
SysObjectsysobjects, objects — queries sys.objects directly, excluding MS-shipped objects
Aliases are case-insensitive and ignore hyphens and underscores (e.g. stored-procedure is treated as StoredProcedure).
partialName
string
Optional substring filter. Applied as a SQL LIKE pattern against both the bare object name and the schema.name qualified form. For example, passing Doc matches dbo.Documents, archive.Documents, and any object whose name contains Doc. Pass null (or omit) to return all objects of the requested type.
sysObjectType
string
Optional sys.objects.type code used only when objectType=SysObject. Filters results to objects whose type column matches this one- or two-character code exactly. Common values:
CodeMeaning
UUser table
VView
PStored procedure
FNScalar function
IFInline table-valued function
TFTable-valued function
TRTrigger
Pass null (or omit) to list all user-defined objects in sys.objects regardless of type.

Returns

The shape of the returned array varies by objectType:
data
array

Usage notes

ListObjects(objectType="Table") is a good first call to orient an agent on the database schema. The compact string-per-table format makes it easy to scan hundreds of tables without a large payload.
For objectType=TableTrigger, the partialName filter matches against the trigger name, the parent table name, schema.table_name, and schema.trigger_name. This makes it easy to find all triggers on a particular table with a single call.
The Function type internally issues two queries (scalar + table-valued) and merges them. If either query fails, ListObjects returns that error immediately. Use ScalarFunction or TableFunction independently if you need to isolate one kind.

Example

Request — list all tables

{
  "tool": "ListObjects",
  "arguments": {
    "objectType": "Table"
  }
}

Response

{
  "success": true,
  "data": [
    "dbo.Customers",
    "dbo.OrderItems",
    "dbo.Orders",
    "sales.SalesTerritory"
  ]
}

Request — list stored procedures matching a partial name

{
  "tool": "ListObjects",
  "arguments": {
    "objectType": "StoredProcedure",
    "partialName": "Order"
  }
}

Response

{
  "success": true,
  "data": [
    {
      "schema": "dbo",
      "name": "usp_GetOrderById",
      "id": 901578250,
      "create_date": "2023-11-14T09:22:01",
      "modify_date": "2024-03-05T14:10:33",
      "description": "Returns a single order by primary key."
    },
    {
      "schema": "dbo",
      "name": "usp_ProcessDailyOrders",
      "id": 933578364,
      "create_date": "2023-11-14T09:25:44",
      "modify_date": "2024-06-01T08:00:00",
      "description": null
    }
  ]
}

Build docs developers (and LLMs) love