Skip to main content
Glama

get_table_stats

Retrieve table scan statistics, tuple counts, dead row accumulation, and maintenance history to assess PostgreSQL table health and identify vacuuming needs.

Instructions

Get scan statistics, tuple counts, dead row accumulation, and maintenance history for tables

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tableNoOptional table name to retrieve detailed metrics for a single table
schemaNoSchema name (default: "public")public
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It correctly indicates a read operation (non-destructive), but does not mention potential performance impact, system catalog access, or whether results vary by database role. The description is accurate but somewhat thin for a statistics tool.

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 that immediately communicates the tool's function. Every word is meaningful, and there is no redundant or extraneous information. Perfectly concise.

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?

The description enumerates the main output categories (scan statistics, tuple counts, dead rows, maintenance history), which is helpful given the lack of an output schema. However, it does not explain what happens when the table parameter is omitted (e.g., returns stats for all tables in the schema), nor does it detail the return structure. Still, it covers the key aspects adequately for a tool with only two optional parameters.

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 the baseline is 3. The description adds no additional meaning to the parameters beyond what the schema already provides (table name, schema name, defaults). It does not clarify parameter interactions or format constraints.

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 uses a specific verb 'Get' and lists exact resources: scan statistics, tuple counts, dead row accumulation, and maintenance history for tables. This clearly distinguishes it from sibling tools like list_tables (just table names) or describe_table (schema info), making the purpose obvious.

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?

The description implies the tool should be used when table statistics are needed, but it offers no explicit guidance on when to prefer it over alternatives like describe_table or get_database_info, nor does it mention restrictions (e.g., required permissions) or cases to avoid. The usage context is clear but not elaborated.

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/mewsyy/pg-context'

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