Skip to main content
Glama
devopam

MCPg - Production-grade PostgreSQL MCP Server

Get hypertable stats

get_hypertable_stats
Read-only

Size and compression statistics for one TimescaleDB hypertable: total/compressed chunk counts, approximate row count, table/index/toast/total bytes, and bytes before/after compression.

Instructions

Size and compression statistics for one TimescaleDB hypertable: total/compressed chunk counts, approximate row count, table/index/toast/total bytes, and bytes before/after compression. Errors if the table is not a hypertable; available=false when the timescaledb extension is not installed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tableYes
schemaYes
databaseNoOptional: target a configured secondary (read-only) database by name; omit for the primary. Call list_databases to see the configured ids.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
tableYes
schemaYes
availableYes
index_bytesYes
table_bytesYes
toast_bytesYes
total_bytesYes
total_chunksYes
compressed_chunksYes
approximate_row_countYes
after_compression_bytesYes
before_compression_bytesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.8.3

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so the safety profile is covered. Beyond that the description adds real behavioral context: it errors on non-hypertable input and returns available=false when timescaledb is missing. It does not, however, note that size figures are estimates (row count is only qualified as approximate).

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 sentences, both front-loaded: the metric inventory leads, and the two failure/degradation conditions are packed into the second sentence with no filler or repetition of the tool name.

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?

With an output schema present, the description need not explain return formatting, and it correctly spends its budget on scope and failure modes. The remaining gap is parameter-level guidance for the required schema/table pair, but overall an agent has enough to call it correctly.

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 only 33% (just the optional database param, which is fully documented in the schema itself). The description adds nothing for the required schema/table parameters; the agent must infer from names alone that they identify the single target hypertable, and no guidance is given on how database selection interacts with the result.

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 ('Size and compression statistics for one TimescaleDB hypertable') and enumerates exactly what is returned: chunk counts, row count, byte breakdown, compression ratios. The scoping to 'one' hypertable implicitly separates it from the collection-oriented siblings such as list_hypertables and list_chunks.

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 by the metric list, and the description states a precondition (the table must be a hypertable) plus a degraded state (available=false without the extension). However, it never names an alternative or states when to prefer this over list_hypertables, list_chunks, or summary/advisory tools.

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

Deploy Server

Other Tools