Detailed reference for all available SQL Server MCP tools
| Parameter | Type | Required | Description |
|---|---|---|---|
| query | string | REQUIRED | The SQL query to execute |
| database | string | OPTIONAL | Optional: Database name to use for this query |
| Parameter | Type | Required | Description |
|---|---|---|---|
| database | string | OPTIONAL | Database name (optional, uses current database if not specified) |
| schema | string | OPTIONAL | Schema name (optional, defaults to dbo) |
| Parameter | Type | Required | Description |
|---|---|---|---|
| table_name | string | REQUIRED | Name of the table to describe |
| database | string | OPTIONAL | Database name (optional) |
| schema | string | OPTIONAL | Schema name (optional, defaults to dbo) |
| Parameter | Type | Required | Description |
|---|---|---|---|
| database | string | OPTIONAL | Database name (optional) |
| schema | string | OPTIONAL | Schema name (optional, defaults to dbo) |
| Parameter | Type | Required | Description |
|---|---|---|---|
| table_name | string | REQUIRED | Name of the table |
| database | string | OPTIONAL | Database name (optional) |
| schema | string | OPTIONAL | Schema name (optional, defaults to dbo) |
| limit | integer | OPTIONAL | Maximum number of rows to return (optional, defaults to 100) |
| offset | integer | OPTIONAL | Number of rows to skip before returning results (optional, defaults to 0). Pair with limit to page through a table. Row order is not guaranteed without an ORDER BY, so pages may overlap or skip rows on tables without a clustered index. |
| where | string | OPTIONAL | WHERE clause conditions (optional) |
| Parameter | Type | Required | Description |
|---|---|---|---|
| table_name | string | REQUIRED | Name of the table to export |
| database | string | OPTIONAL | Database name (optional) |
| schema | string | OPTIONAL | Schema name (optional, defaults to dbo) |
| limit | number | OPTIONAL | Maximum number of rows to export (optional) |
| where | string | OPTIONAL | WHERE clause conditions (optional) |
| Parameter | Type | Required | Description |
|---|---|---|---|
| timeframe | string | OPTIONAL | Time period for stats: |
| Parameter | Type | Required | Description |
|---|---|---|---|
| limit | number | OPTIONAL | Maximum number of queries to analyze (optional, defaults to 50) |
| tool_filter | string | OPTIONAL | Filter by specific MCP tool name (optional) |
| slow_only | boolean | OPTIONAL | Only return slow queries (optional, defaults to false) |
| Parameter | Type | Required | Description |
|---|---|---|---|
| query | string | REQUIRED | The SQL query to analyze |
| database | string | OPTIONAL | Optional: Database name to use for this query |
| include_actual_plan | boolean | OPTIONAL | Include actual execution statistics (optional, defaults to false) |
| Parameter | Type | Required | Description |
|---|---|---|---|
| query | string | REQUIRED | SQL query to analyze for performance optimization |
| database | string | OPTIONAL | Database name (optional) |
| Parameter | Type | Required | Description |
|---|---|---|---|
| database | string | OPTIONAL | Database name (optional) |
| schema | string | OPTIONAL | Schema name to restrict recommendations to (optional; omit to cover all schemas) |
| limit | number | OPTIONAL | Maximum number of recommendations to return (optional, defaults to 10) |
| impact_threshold | number | OPTIONAL | Minimum impact score threshold (0-100, optional) |
| Parameter | Type | Required | Description |
|---|---|---|---|
| database | string | OPTIONAL | Database name (optional) |
| limit | number | OPTIONAL | Maximum number of bottlenecks to return (optional, defaults to 10) |
| severity_filter | string | OPTIONAL | Filter by severity level: LOW, MEDIUM, HIGH, CRITICAL (optional) |
| Parameter | Type | Required | Description |
|---|---|---|---|
| database | string | OPTIONAL | Database name (optional) |
| analysis_period | string | OPTIONAL | Analysis time period: 24_HOURS, 7_DAYS, 30_DAYS (optional). RESERVED: accepted but not yet applied. The two DMV sources have different lifetimes and cannot be windowed consistently: missing-index aggregates are cumulative (reset only by a server restart or index/database changes) while query-stats rows last only while their plan stays in cache, so results reflect the lifetime of each source regardless of the value sent; the response discloses this in its analysisPeriod field. |
| Parameter | Type | Required | Description |
|---|---|---|---|
| include_logs | boolean | OPTIONAL | Include recent log entries (optional, defaults to false) |