Skip to main content
Glama
nandanosql

database-explorer-mcp

by nandanosql

get_table_stats

Retrieve row counts, sizes, index counts, and last analysis times for a specific database table or all tables.

Instructions

Get statistics for database tables — row counts, sizes, index counts, and last analysis time.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tableNoSpecific table name (omit for all tables)
connectionNoConnection alias (default: 'default')

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

B3.1/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden. It implies a read operation via 'Get' and lists returned metrics, but says nothing about permissions, whether stats come from a cache or a live catalog scan, whether omitting 'table' is costly on a large database, or how fresh the 'last analysis time' is. This is thin for a mutation-free but potentially expensive diagnostic call.

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 front-loaded sentence with the core purpose stated first and the returned metrics enumerated after. Every clause earns its place with no preamble or 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?

There is no output schema, and the description usefully compensates by listing the metrics returned. However, with no annotations either, the definition is silent on the read-only nature, cost, and freshness of the statistics, which an agent calling this against a large database would want to know.

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%, so both the 'table' and 'connection' parameters are already documented in the schema ('omit for all tables', 'default: default'). The description adds no syntax or format detail beyond that, so the baseline of 3 applies.

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 gives a specific verb (get) and resource (table statistics) and even enumerates what the statistics contain: row counts, sizes, index counts, last analysis time. This clearly separates it from siblings like describe_table or list_tables, though it never explicitly names what those siblings return to force the distinction.

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?

There is no explicit guidance on when to use this tool versus list_tables, describe_table, or get_schema, and no stated prerequisites or exclusions. Usage is only weakly implied by the phrase 'Get statistics for database tables', leaving the agent to infer the scenario.

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