Azure-Samples / Azure-Samples/SQL-AI-samples

MssqlMcp: Incorrect tool tags - 'List Tables' marked as destructive, 'Create Table' marked as read-only

未關閉
#90 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
HTML
星號
331
分支
208
PR 合併指標
30 天內沒有已合併 PR

描述

## Problem

The MssqlMcp .NET server has incorrect tool tags that misrepresent the nature of operations:

**Current (incorrect) behavior:**
- `ListTables` is tagged as **destructive**
- `CreateTable` is tagged as **read-only**
- `DescribeTable` is tagged as **read-only** ✓ (correct)

**Expected behavior:**
- `ListTables` should be tagged as **read-only** (it only queries metadata via INFORMATION_SCHEMA or sys tables)
- `CreateTable` should be tagged as **destructive** or **write** (it modifies database schema)
- Other write operations (`InsertData`, `UpdateData`, `DropTable`) should also be reviewed for correct tagging

## Impact

This causes user confusion and may trigger unnecessary confirmations for safe read operations while failing to warn about actual schema modifications.

## Environment

- MssqlMcp version: Built from main branch (dotnet implementation)
- .NET 8.0
- MCP SDK: Official C# SDK

## Steps to Reproduce

1. Configure MssqlMcp server in Claude Desktop or VS Code
2. View available tools
3. Observe incorrect tags on `ListTables` (destructive) and `CreateTable` (read-only)

## Additional Context

The tool tags appear to be swapped or misconfigured in the tool definitions. `ListTables` performs a SELECT query on database metadata and should be completely safe/read-only.

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。