Skip to main content
Glama
esasiyun17

MSSQL-MCP

by esasiyun17

List tables

list_tables

Retrieve schema-qualified table names and approximate row counts from system metadata, respecting any configured allowlist.

Instructions

List all tables in the database as schema.table with approximate row counts (taken from sys.partitions metadata — no COUNT(*) is executed). If a table allowlist is configured, only allowed tables are returned.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.1

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burden and does well: it discloses that row counts are approximate and sourced from sys.partitions with no COUNT(*) executed, which is a real performance trait an agent should know, and it discloses allowlist filtering that can silently reduce results. It stops short of stating read-only/pagination behavior explicitly, but 'List' plus 'no COUNT(*) is executed' conveys a safe, cheap read.

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 tight sentences with zero filler, front-loaded with what is returned before the metadata caveat and the allowlist caveat. Every clause adds information.

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?

There is no output schema, so the description must describe returns — and it does, naming the identifier format and the row-count caveat. Combined with the allowlist note, an agent has everything needed to call this zero-parameter tool correctly and interpret the result.

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 takes zero parameters, so the baseline is 4. The description correctly adds no parameter detail and instead spends its words on output semantics, which is the right allocation.

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 states a precise verb and resource ('List all tables in the database') and goes further by specifying the exact return shape ('as schema.table with approximate row counts'). This clearly separates it from siblings like describe_table (single table) and run_query (arbitrary SQL), which is a meaningful distinction an agent can act on.

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?

Usage is implied rather than stated: the agent can infer this is the discovery tool to call before describe_table or sample_rows, but no explicit when-to-use or when-not-to-use guidance is given. It never names an alternative or a condition that would select it over run_query.

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