Skip to main content
Glama
mssql-mcp

mssql-mcp

by dhipskind253

mssql-mcp

这是一个只读的 Microsoft SQL Server MCP 服务器,在工具调用时从 AWS Secrets Manager 获取连接详细信息 — 除了密钥引用本身,不会从磁盘或环境变量中读取任何内容。

跨平台:它是一个纯 JavaScript 的 MCP 服务器(没有原生或 ODBC 依赖),因此可以通过 npx 在 macOS、Linux 和 Windows 上以相同方式运行。

在 .claude.json 中配置

{
  "mcpServers": {
    "my-db": {
      "command": "npx",
      "args": ["-y", "@dhipskind253/mssql-mcp"],
      "env": {
        "AWS_ACCOUNT_ID": "123456789012",
        "SECRET_NAME": "my-aws-secret",
        "AWS_REGION": "us-east-1",
        "TRUST_SERVER_CERTIFICATE": "false"
      }
    }
  }
}

环境变量

必需

默认值

描述

AWS_ACCOUNT_ID

是

—

密钥所在的 AWS 账户。与名称和区域组合成完整的 ARN。

SECRET_NAME

是

—

Secrets Manager 密钥名称(无需 ARN 后缀)。

AWS_REGION

是

—

密钥所在的 AWS 区域(例如 us-east-1)。也会被 AWS SDK 识别为默认区域。

TRUST_SERVER_CERTIFICATE

否

false

跳过对 SQL Server 的 TLS 证书验证。接受 true/false/1/0/yes/no。仅在了解原因的情况下设置为 true。

标准的 AWS SDK 环境变量(AWS_PROFILE、AWS_ACCESS_KEY_ID 等)通过默认凭证提供程序链生效。大多数用户只需确保 aws sso login 处于登录状态即可。

Related MCP server: MSSQL MCP Python Server

所需的密钥 JSON

密钥值必须是一个至少包含以下字段的 JSON 文档:

{
  "host": "myserver.database.windows.net",
  "port": 1433,
  "database": "mydb",
  "username": "ro_user",
  "password": "..."
}

database 也可以作为 dbname 提供 — 这是 AWS 在其内置 RDS 凭证密钥模板中使用的字段名称。如果两者同时存在,则以 database 为准。

可选字段(显示默认值):

字段

默认值

说明

port

1433

encrypt

true

到服务器的 TLS 加密。

TLS 证书信任设置不会从密钥中读取 — 请在 MCP 服务器的 env 块中设置 TRUST_SERVER_CERTIFICATE。密钥 JSON 中的任何 trustServerCertificate 字段都将被忽略。

设计上的只读限制

此服务器无法插入、更新或删除数据。通过两层机制强制执行:

  1. run_select 工具在词法上拒绝任何非单个 SELECT 或 WITH (CTE) 语句的内容 — 包括 INSERT、UPDATE、DELETE、EXEC、MERGE、DROP、ALTER、SELECT INTO 等。

  2. 没有其他工具会发出写入 SQL。get_procedure_definition 返回存储过程源码 — 它不会执行存储过程。

温馨提示: 请将词法检查视为用户体验,而非安全边界。为了方便未来的自己,请将您放入 Secrets Manager 的凭证配置为只读数据库登录 — 即仅拥有 SELECT 和 VIEW DEFINITION 权限的账号。这样,即使发生意外写入(或未来的代码漏洞),SQL Server 本身也会拒绝该操作。

无需重启即可刷新 AWS 凭证

由于服务器使用默认的 AWS 凭证链,过期的 SSO 会话可以在不重启 Claude 或 MCP 服务器的情况下恢复:

  1. 在任何终端运行 aws sso login。

  2. 要求 Claude 调用 refresh_secret 工具。

  3. 继续工作。

如果工具调用因 AWS 身份验证失败,错误消息会明确告知您,并提示执行相同的流程。错误带有稳定的前缀标记:

前缀

含义

[AWS_AUTH_REQUIRED]

SSO 会话过期或没有可用的凭证。

[AWS_ACCESS_DENIED]

主体缺少 secretsmanager:GetSecretValue 权限。

[AWS_SECRET_NOT_FOUND]

密钥名称/账户/区域不匹配。

[AWS_SECRET_INVALID]

密钥 JSON 缺少字段或格式错误。

[DB_CONNECT_FAILED]

无法连接到 SQL Server 实例。

[DB_QUERY_FAILED]

SQL Server 在执行查询时返回错误。

[INVALID_QUERY]

提交的查询违反了只读规则。

工具

工具

用途

list_schemas

数据库中的用户架构。

list_tables

表,可选择按架构过滤。

describe_table

列、类型、可空性、标识、主键、默认值。

list_indexes

表上的索引(每个索引/列一行)。

list_foreign_keys

表的传出外键。

list_views

视图,可选择按架构过滤。

get_view_definition

视图源码 SQL。

list_procedures

存储过程,可选择按架构过滤。

get_procedure_definition

存储过程源码 SQL(不执行)。

sample_rows

SELECT TOP n * FROM schema.table(默认 10,最大 100)。

run_select

单个 SELECT/CTE,限制为 max_rows(默认 100,硬上限 1000)。

refresh_secret

重新获取密钥并重新连接。

本地开发

npm install
npm run build
# point your .claude.json command at the local build:
#   "command": "node",
#   "args": ["/absolute/path/to/mssql-mcp/dist/index.js"]

Available Tools

12 tools
describe_tableA

Return columns, data types, nullability, identity, primary key, and defaults for a table.

NameRequiredDescriptionDefault
schemaYesSchema name (e.g. "dbo").
tableYesTable name.

TDQS

A3.8/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Without annotations, the description bears full burden. It explicitly lists the returned information (columns, data types, nullability, identity, primary key, defaults), which is good. However, it does not disclose potential error cases, permission requirements, or if the result is a single object or list.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that captures the tool's purpose without waste. It is front-loaded with the key action and output.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of output schema, the description adequately covers what the tool returns. It lists all key aspects of a table schema. Minor omission: it doesn't specify the output format (e.g., array of objects) or order.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Both parameters have clear descriptions in the schema (schema name with example, table name). The description adds no extra meaning beyond these, so baseline of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool returns columns, data types, nullability, identity, primary key, and defaults for a table. It distinguishes from siblings like list_tables (listing tables) and sample_rows (sampling data), making the purpose unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. There is no mention of prerequisites, exclusions, or other tools like list_foreign_keys for more detailed schema info.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_procedure_definitionA

Return the SQL definition of a stored procedure. (Definitions are read-only — this server cannot EXEC procedures.)

NameRequiredDescriptionDefault
schemaYes
procedureYes

TDQS

A4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries full burden and proactively states the tool is read-only and that the server cannot execute procedures. This discloses behavioral traits beyond the schema, though it could mention error handling or permissions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise with two sentences, no filler, and front-loads the core action. Every sentence adds value, earning a top score.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description lacks details about the return format (e.g., a string with the SQL definition) and does not address error cases or behavior when the procedure does not exist. Given no output schema, more completeness is warranted.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Despite 0% schema description coverage, the description adds no parameter-level detail beyond the parameter names. It does not explain expected formats, constraints, or examples for 'schema' and 'procedure', leaving the agent with minimal guidance.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Return the SQL definition') and resource ('stored procedure'), and it clearly distinguishes from sibling tools like 'get_view_definition' by specifying 'stored procedure' and noting the server's limitation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly states that definitions are read-only and that the server cannot execute procedures, providing clear context for when to use this tool. However, it does not offer an alternative for when execution is needed, which would improve guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_view_definitionC

Return the SQL definition of a view.

NameRequiredDescriptionDefault
schemaYes
viewYes

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must disclose behavior. It identifies the operation as read-only but omits permissions, error handling, or side effects.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single concise sentence with no unnecessary words, achieving high efficiency.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no annotations, no output schema, and zero param descriptions, the tool is severely underdocumented. The description covers only the bare minimum and fails to provide enough information for correct use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, and the description does not explain or add meaning to the 'schema' and 'view' parameters beyond their names.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool returns the SQL definition of a view, using a specific verb and resource. It distinguishes itself from siblings like describe_table and list_views.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives like describe_table or get_procedure_definition. The description lacks context for selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_foreign_keysC

List foreign keys originating from a table.

NameRequiredDescriptionDefault
schemaYes
tableYes

TDQS

C2.7/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, and the description does not disclose behavioral traits such as whether it returns only referencing foreign keys, permission requirements, or output format. The description is too minimal for a tool without annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence, which is concise, but it could include more detail without becoming verbose. It is adequately structured but lacks substance.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema and no annotations, the description should explain return values and any limitations. It does not, making it incomplete for an agent to fully understand tool behavior.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description does not explain the two required parameters (schema and table) beyond what the schema provides. With 0% schema description coverage, the description should compensate, but it adds no additional meaning.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'List foreign keys originating from a table', which is a specific verb (list) and resource (foreign keys from a table). It distinguishes from siblings like describe_table or list_indexes which have different purposes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives like list_indexes or describe_table. No exclusions or usage context are mentioned.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_indexesB

List indexes on a table, one row per (index, column).

NameRequiredDescriptionDefault
schemaYes
tableYes

TDQS

B3.3/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations exist, so the description carries full burden. It discloses the output format (rows per index-column pair) but does not explicitly state it's read-only, error handling, or performance implications. Adequate but not detailed.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, concise sentence that front-loads the purpose. It is efficient but could include slight expansions without being verbose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple tool with two parameters and no output schema, the description covers the basic purpose and output format. However, it lacks usage context, error conditions, and full specification of return columns, making it minimally sufficient.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, and the description does not explain the parameters 'schema' and 'table'. It relies on parameter names being self-explanatory, providing no additional meaning beyond their names.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool lists indexes on a table and specifies the output format ('one row per (index, column)'). The verb 'list' and resource 'indexes on a table' are explicit, and it distinguishes from sibling tools like describe_table or list_tables.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives, no prerequisites, and no exclusions. The description only states what it does without context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_proceduresB

List stored procedures, optionally filtered by schema.

NameRequiredDescriptionDefault
schemaNo

TDQS

B3.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations exist, so the description must disclose behaviors. It only states basic functionality and omits details like read-only nature, potential cost, pagination, or response format.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Very short and front-loaded, but perhaps too brief. It efficiently conveys the core functionality without extra words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple tool with one optional parameter, the description is adequate but lacks details on output format, sorting, or limits. The absence of an output schema heightens the need for more description.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description adds minimal meaning by mentioning 'optionally filtered by schema', but doesn't explain the parameter's format or accepted values beyond what the type implies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool lists stored procedures with optional schema filtering. It distinguishes itself from sibling list tools by specifying the resource type (procedures).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this vs alternative tools like get_procedure_definition or other list tools. The description fails to provide context for decision-making.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_schemasA

List user-defined schemas in the configured database.

NameRequiredDescriptionDefault

No parameters

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It only states 'list,' implying a read-only operation, but does not disclose any permissions requirements, error conditions, or other behavioral traits. For a simple listing, this is adequate but not rich.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single sentence that is perfectly concise and front-loaded. Every word is necessary and contributes to clarity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a parameterless list tool, the description covers its purpose and scope. It does not specify the return format, but with no output schema, it is mostly sufficient. Could mention if it returns schema names or full objects.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has no parameters (0 params, 100% coverage). Per guidelines, baseline is 4. The description adds no parameter semantics since none exist.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action (list), the resource (user-defined schemas), and the scope (configured database). It distinguishes from sibling tools like list_tables and list_views by specifying schemas.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit when-to-use or when-not-to-use guidance is given. The usage is implied by the tool's name and description, but alternatives are not mentioned. However, the context of listing schemas is straightforward.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_tablesB

List tables, optionally filtered by schema.

NameRequiredDescriptionDefault
schemaNoOptional schema name. If omitted, returns tables from all schemas.

TDQS

B3.4/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It only states the basic operation without disclosing whether the tool is read-only, any side effects, or behavior beyond listing. No behavioral traits beyond the action are mentioned.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence that efficiently conveys the core purpose. It is appropriately sized for the tool's simplicity, though it could include more detail without being verbose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has one optional parameter and no output schema, the description is minimal but sufficient for basic understanding. However, it does not hint at the output format (e.g., list of table names), which would improve completeness. It lacks mention of permissions or other contextual details.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% (the only parameter is described). The description adds no new meaning beyond the schema's description of the 'schema' parameter. It restates the optional filter, so it is adequate but not additive.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('List tables') and resource, and the optional filtering by schema distinguishes it from siblings like 'list_schemas' and 'describe_table'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implicitly tells when to use this tool (to list tables, optionally filtered by schema) but does not provide explicit guidance on when not to use it or alternatives. It lacks exclusion criteria.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_viewsC

List views, optionally filtered by schema.

NameRequiredDescriptionDefault
schemaNo

TDQS

C2.7/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description must fully convey behavioral traits. It merely states 'List views' without clarifying return format, safety (read-only implied but not explicit), auth requirements, or error handling.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise (one sentence) and easy to parse. However, it could be slightly more structured by front-loading the resource and then the filter option.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (one optional param, no output schema), the description is incomplete: it does not specify what information is returned (e.g., view names, definitions) or how the schema filter works.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0% description coverage for the 'schema' parameter, and the description only says 'optionally filtered by schema' without explaining the expected format (e.g., exact name, pattern, or whether it's required).

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool lists views with an optional schema filter. However, it does not differentiate from sibling listing tools like list_tables or list_schemas, which follow similar patterns.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives such as describe_table or get_view_definition. The description lacks context about prerequisites or exclusion criteria.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

refresh_secretA

Re-fetch the database credentials from AWS Secrets Manager and reconnect. Call this after running aws sso login to recover from an expired session, or after the secret has been rotated.

NameRequiredDescriptionDefault

No parameters

TDQS

A4.7/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Without annotations, the description carries full burden. It discloses the core action (re-fetch and reconnect) but does not detail specific side effects like connection interruptions or state changes. However, the simplicity of the tool makes this acceptable.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two concise sentences with no extraneous information. Key points are front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a zero-parameter tool with no output schema, the description sufficiently explains the purpose, triggers, and expected behavior.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, so baseline is 4. The description adds no parameter-specific info but is not needed.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly specifies the verb 'Re-fetch' and the resource 'database credentials from AWS Secrets Manager and reconnect'. It distinguishes itself from sibling tools which are read-only or schema-focused, as this is the only tool that manages credentials.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit when-to-use scenarios: after running `aws sso login` (to recover from expired session) or after secret rotation. This guides the agent away from unnecessary calls during normal operation.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

run_selectA

Run a single SELECT or WITH (CTE) statement. DML/DDL/EXEC are rejected before reaching the server. Results are capped at max_rows (default 100, hard max 1000).

NameRequiredDescriptionDefault
queryYesA single SELECT or WITH statement.
max_rowsNo

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description discloses key behaviors: result capping (default 100, hard max 1000) and rejection of non-SELECT/WITH statements. It does not mention auth or rate limits, but these are not critical for a read-only query.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences, front-loaded with the main purpose, then constraints. No wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers key aspects for a query tool but does not mention the output format (e.g., row set, metadata). Given siblings are metadata tools, this is minor.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds value beyond the schema by clarifying max_rows default and limit. The query parameter is sufficiently explained in the schema, and the description reinforces it.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states that the tool runs a SELECT or WITH statement, distinguishing it from sibling tools that query metadata (e.g., list_tables, describe_table).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly states that DML/DDL/EXEC are rejected, guiding the agent away from invalid uses. However, it does not mention alternative tools for other query types.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

sample_rowsA

Return up to N rows from a table (SELECT TOP N *). Default 10, max 100.

NameRequiredDescriptionDefault
schemaYes
tableYes
nNo

TDQS

A3.5/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations exist, and the description only states it returns rows with a limit. It does not disclose ordering (or lack thereof), whether it's read-only (though implied), or any performance implications.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single concise sentence with a parenthetical clarification. Every word adds value, no redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema and no annotations, the description provides the core purpose and parameter constraints but omits details like whether the sample is random or the output columns.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has 0% description coverage, so the description compensates by detailing the 'n' parameter's default and max. However, 'schema' and 'table' get no additional meaning beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool returns rows from a table, using 'SELECT TOP N *', with exact default and max limits. This distinguishes it from sibling tools like describe_table or run_select.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for sampling rows for quick preview, but does not explicitly compare to alternatives like run_select or mention when not to use it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 12 tool updatesv0.1.0
    • First observeddescribe_table
    • First observedget_procedure_definition
    • First observedget_view_definition
    • First observedlist_foreign_keys
    • First observedlist_indexes
    • First observedlist_procedures
    • First observedlist_schemas
    • First observedlist_tables
    • First observedlist_views
    • First observedrefresh_secret
    • First observedrun_select
    • First observedsample_rows

TDQS

A3.7/5.0

Scored across 12 tools

Disambiguation5/5

Each tool has a clearly distinct purpose: listing metadata (tables, views, schemas, procedures, indexes, foreign keys), retrieving definitions, running SELECT queries, sampling rows, and refreshing credentials. No two tools can be confused.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern in snake_case, e.g., 'describe_table', 'list_procedures', 'run_select'. There are no deviations or mixed conventions.

Tool Count5/5

12 tools is appropriate for a database exploration and querying server. The set covers all common operations without being excessive or sparse.

Completeness4/5

The tool surface is nearly complete for read-only database interaction: metadata listing, definition retrieval, SELECT querying, and sampling. Minor gaps include absence of database-level listing or system views, but the core use case is well-covered.

Related MCP Connectors

Related MCP Servers