Skip to main content
Glama
bpamiri

SQL Server MCP

by bpamiri

list_databases

Discover accessible databases on SQL Server by querying sys.databases, excluding system and blocked databases by default, with options to include system databases.

Instructions

List all available databases on the SQL Server.

Queries sys.databases to discover accessible databases. System databases
(master, tempdb, model, msdb) are excluded by default. Databases in the
blocklist (MSSQL_BLOCKED_DATABASES) are always excluded.

Args:
    include_system: If True, include system databases in the list

Returns:
    Dictionary with:
    - databases: List of available database names
    - current_database: The currently active database
    - count: Number of databases returned
    - blocked_count: Number of databases hidden due to blocklist

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
include_systemNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations provided, the description carries full burden and does well by disclosing behavioral traits: it explains the data source (sys.databases), default exclusions (system databases), blocklist behavior (MSSQL_BLOCKED_DATABASES), and return format. It does not mention rate limits, auth needs, or destructive effects, but covers key operational details adequately.

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 appropriately sized and front-loaded with the core purpose in the first sentence. The structured sections (Args, Returns) are efficient, but some redundancy exists (e.g., repeating exclusion details). Every sentence adds value, though minor trimming could improve conciseness.

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?

Given the tool's moderate complexity, no annotations, and the presence of an output schema, the description is complete enough. It covers purpose, usage context, parameter semantics, and behavioral details, and the output schema handles return values, so no gaps remain for effective agent use.

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 significant meaning beyond the input schema, which has 0% description coverage. It explains the 'include_system' parameter's effect (including system databases in the list) and its default behavior (excluded by default). This compensates well for the schema's lack of descriptions, though it doesn't detail format or constraints beyond the boolean type.

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 verb 'List' and resource 'all available databases on the SQL Server', specifying it queries sys.databases. It distinguishes from siblings like list_tables or list_stored_procs by focusing on databases rather than other SQL objects.

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 provides clear context about when to use this tool (to discover accessible databases) and mentions exclusions (system databases and blocklisted ones). However, it does not explicitly state when to use alternatives like list_connections or switch_database, missing explicit sibling differentiation.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/bpamiri/pymssql-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server