Skip to main content
Glama

table_sizes

Read-only

Rank PostgreSQL tables by total relation size, including table data, indexes, and TOAST, to find space-heavy tables for cleanup or review.

Instructions

[READ] Largest tables by total relation size (table + indexes + TOAST).

Args:
    limit: Number of tables to return, largest first (default 20).
    target: Target name from config; omit for the default.

Input Schema

NameRequiredDescriptionDefault
limitNo
targetNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

readOnlyHint=true already declares the safety profile, so the bar is lower. The description adds useful context: what 'size' includes (table + indexes + TOAST) and that results are ordered largest-first. No mention of cost, sampling, or cross-target behavior, so it stays at a solid-but-limited 3.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the [READ] signal and a one-line purpose, followed by compact Args. No wasted sentences; the structure is easy to scan, though the Args block is slightly verbose for only two parameters.

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?

For a simple two-parameter read tool with annotations covering safety and no output schema, the description covers purpose, ordering, defaults, and target resolution. It stops short of describing the returned columns, which would fully close the loop.

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 0%, so the description must carry the burden — and it does, documenting both parameters: 'limit' as a count with largest-first ordering and a default, and 'target' as a config name with omit-for-default semantics. It adds real meaning the bare schema lacks.

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?

States a specific verb+resource — largest tables ranked by total relation size — and even disambiguates the metric by defining it as table + indexes + TOAST. This distinguishes it from siblings like table_bloat and index_bloat, though it doesn't name an alternative explicitly.

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?

The [READ] tag implies a read-only inspection use case, but there is no explicit when-to-use guidance and no mention of when to prefer this over table_bloat, index_bloat, or other size-related siblings. The agent must infer context.

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