Skip to main content
Glama
shadow-dba

mssql-dba-mcp

by shadow-dba

Get Privileged Logins

mssql_privileged_logins
Read-onlyIdempotent

Audit SQL Server sysadmin and securityadmin role members, marking accounts as Expected, Built-in, or REVIEW. Pass expectedAccounts to reduce false positives.

Instructions

Security: members of the sysadmin and securityadmin server roles, each marked Expected (in expectedAccounts), Built-in (sa, NT SERVICE*, NT AUTHORITY\SYSTEM, ##...##) or REVIEW. Needs VIEW ANY DEFINITION to see all members. Not available on Azure SQL Database.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
expectedAccountsNoLogins expected to hold these roles (e.g. service or DBA accounts). Case-insensitive. They are marked Expected instead of REVIEW.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive/openWorld=false, so the bar is low; the description still adds real behavioral facts beyond them — the permission requirement for full visibility and the Azure SQL Database unavailability. It stops short of describing output shape or how the REVIEW marking is derived.

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?

Three short, information-dense clauses with zero filler: what it lists, how each member is classified, what permission is required, and where it does not work. Everything is front-loaded; no sentence is expendable.

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?

With no output schema, the description must convey the returned content, and it does — role membership plus the Expected/Built-in/REVIEW triage marks. Prerequisites and platform limits are covered, leaving nothing an agent needs before calling it.

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?

Schema coverage is 100%, so the baseline is 3, but the description adds meaning the schema alone implies only indirectly: that listed accounts are marked 'Expected instead of REVIEW', tying the parameter to a visible output classification. The case-insensitivity detail remains schema-only, which is fine.

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?

States a specific verb+resource: enumerating members of the sysadmin and securityadmin server roles, with the exact classifications returned (Expected, Built-in, REVIEW). No sibling tool covers security role membership, so it is trivially distinguishable from the health/DB-inspection siblings.

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?

Frames the tool as a security audit check and states the precondition (needs VIEW ANY DEFINITION to see all members) plus the platform exclusion (not available on Azure SQL Database). It does not name alternative tools, but no sibling overlaps, so the when-to-use context is effectively complete.

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