Skip to main content
Glama
dhipskind253

mssql-mcp

by dhipskind253

mssql-mcp

A read-only Microsoft SQL Server MCP server using connection details from AWS Secrets Manager at tool-call time — nothing is read from disk or environment variables except the secret reference itself.

This is a light-weight mcp meant for local development use. It avoids database credentials in your agent config, works nicely with a credential process and tools like aws-vault, and allows for readonly database access and schema discovery.

Cross-platform: it's a pure-JavaScript MCP server (no native or ODBC dependencies), so it runs identically on macOS, Linux, and Windows via npx.

Configure in .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"
      }
    }
  }
}

Env var

Required

Default

Description

AWS_ACCOUNT_ID

yes

The AWS account where the secret lives. Combined with name + region into a full ARN.

SECRET_NAME

yes

The Secrets Manager secret name (no ARN suffix needed).

AWS_REGION

yes

AWS region the secret is in (e.g. us-east-1). Also picked up by the AWS SDK as its default region.

TRUST_SERVER_CERTIFICATE

no

false

Skip TLS cert validation to the SQL Server. Accepts true/false/1/0/yes/no. Set true only if you understand why.

Standard AWS SDK env vars (AWS_PROFILE, AWS_ACCESS_KEY_ID, etc.) are honored via the default credential provider chain. Most users just need aws sso login to be current.

Related MCP server: MSSQL MCP Python Server

Required secret JSON

The secret value must be a JSON document with at least these fields:

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

database may also be supplied as dbname — the field name AWS uses in its built-in RDS-credentials secret template. If both are present, database wins.

Optional fields (with defaults shown):

Field

Default

Notes

port

1433

encrypt

true

TLS to the server.

TLS cert trust is not read from the secret — set TRUST_SERVER_CERTIFICATE in the MCP server's env block instead. Any trustServerCertificate field in the secret JSON is ignored.

Read-only by design

This server cannot insert, update, or delete data. Two layers enforce that:

  1. The run_select tool lexically rejects anything that isn't a single SELECT or WITH (CTE) statement — including INSERT, UPDATE, DELETE, EXEC, MERGE, DROP, ALTER, SELECT INTO, etc.

  2. No other tool emits write SQL. get_procedure_definition returns procedure source — it does not run procedures.

Courtesy note: treat the lexical check as UX, not a security boundary. As a courtesy to your future self, configure the credentials you put in Secrets Manager to be a read-only database login — one with SELECT and VIEW DEFINITION only. That way an accidental write (or a future bug here) is rejected by SQL Server itself.

Refreshing AWS credentials without restarting

Because the server uses the default AWS credential chain, an expired SSO session can be recovered without restarting Claude or the MCP server:

  1. Run aws sso login in any terminal.

  2. Ask Claude to call the refresh_secret tool.

  3. Continue working.

If a tool call fails because of AWS auth, the error message will tell you exactly that and prompt the same flow. Errors are tagged with stable prefixes:

Prefix

Meaning

[AWS_AUTH_REQUIRED]

SSO session expired or no credentials available.

[AWS_ACCESS_DENIED]

Principal lacks secretsmanager:GetSecretValue.

[AWS_SECRET_NOT_FOUND]

Secret name / account / region mismatch.

[AWS_SECRET_INVALID]

Secret JSON is missing fields or malformed.

[DB_CONNECT_FAILED]

Could not reach the SQL Server instance.

[DB_QUERY_FAILED]

SQL Server returned an error executing the query.

[INVALID_QUERY]

The submitted query violated the read-only rules.

Tools

Tool

Purpose

list_schemas

User schemas in the database.

list_tables

Tables, optionally filtered by schema.

describe_table

Columns, types, nullability, identity, PK, defaults.

list_indexes

Indexes on a table (one row per index/column).

list_foreign_keys

Outgoing FKs from a table.

list_views

Views, optionally filtered by schema.

get_view_definition

View source SQL.

list_procedures

Stored procedures, optionally filtered by schema.

get_procedure_definition

Procedure source SQL (does not execute).

sample_rows

SELECT TOP n * FROM schema.table (default 10, max 100).

run_select

Single SELECT/CTE, capped at max_rows (default 100, hard max 1000).

refresh_secret

Re-fetch the secret and reconnect.

Local development

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.

ParametersJSON Schema
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.)

ParametersJSON Schema
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.

ParametersJSON Schema
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.

ParametersJSON Schema
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).

ParametersJSON Schema
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.

ParametersJSON 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.

ParametersJSON Schema
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.

ParametersJSON 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.

ParametersJSON 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.

ParametersJSON Schema
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).

ParametersJSON Schema
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.

ParametersJSON Schema
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.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers