Skip to main content
Glama

table_sizes

Identify the largest PostgreSQL tables by total size including indexes and TOAST data. Use to prioritize storage optimization and bloat management.

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

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
targetNo
Behavior4/5

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

No annotations provided, so description carries full burden. It clearly marks the operation as read-only with '[READ]', and no destructive hints are needed. It does not mention side effects, but for a read-only query that seems acceptable. It adds the detail about including indexes and TOAST.

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?

Description is extremely concise: two sentences and parameter info. The '[READ]' prefix front-loads the most critical behavioral information. Every sentence adds value with no fluff.

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?

Given the tool's simplicity (2 parameters, no output schema), the description covers the essentials: what it returns, default behavior, and the target parameter. It does not describe the return format, but for a list of largest tables this is acceptable. Could be improved by mentioning that results are sorted descending.

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?

Input schema has 0% description coverage, so description compensates fully. It explains 'limit' (number of tables, default 20) and 'target' (target name, optional). This adds meaning beyond the schema's raw structure, though it could clarify what 'target' refers to.

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?

Description uses a specific verb ('list' implied) and clear resource ('largest tables by total relation size'). It specifies the computation (table + indexes + TOAST), making the tool's purpose distinct from sibling tools like 'table_bloat' or 'missing_index_hints'.

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?

No explicit guidance on when to use or alternatives. The read-only nature is implied by '[READ]', but no exclusions or comparisons to siblings are given. Adequate for a simple information tool, but lacks context for an agent to decide between this and similar tools like 'overview' or 'table_bloat'.

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/AIops-tools/Postgres-AIops'

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