Skip to main content
Glama
call518

MCP PostgreSQL Operations

get_table_size_info

Analyze PostgreSQL table sizes and index usage within a schema to monitor storage capacity and identify resource distribution across tables.

Instructions

[Tool Purpose]: Analyze size information and index usage of all tables in specified schema

[Exact Functionality]:

  • Retrieve size information of all tables within schema

  • Analyze index size and total size per table

  • Provide table list sorted by size

[Required Use Cases]:

  • When user requests "table size", "schema capacity", "index usage", etc.

  • When storage analysis of specific schema is needed

  • When resource usage status per table needs to be identified

[Strictly Prohibited Use Cases]:

  • Requests for table data deletion or cleanup operations

  • Requests for index creation or deletion

  • Requests for table structure changes

Args: schema_name: Schema name to analyze (default: "public") database_name: Database name to analyze (uses default database if omitted)

Returns: Information sorted by size including table name, table size, index size, and total size

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
schema_nameNopublic
database_nameNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations provided, the description carries full burden and does well by disclosing behavioral traits: it specifies the tool retrieves and analyzes information (read-only operation), provides sorted output, and explicitly prohibits destructive operations like deletion or structural changes. However, it doesn't mention potential rate limits, authentication needs, or performance impact.

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

Conciseness3/5

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

The description is well-structured with labeled sections (Tool Purpose, Exact Functionality, etc.), but it includes redundant elements like 'Args:' and 'Returns:' that repeat information from other sections. Some sentences could be more concise, but overall it's organized and front-loaded with key purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (2 parameters, no annotations, but has output schema), the description is complete: it covers purpose, functionality, usage guidelines, prohibitions, parameters, and return values. The output schema existence means the description doesn't need to detail return format, and it adequately addresses all necessary context for a read-only analysis tool.

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 description coverage is 0%, so the description must compensate. It explains that 'schema_name' is the 'Schema name to analyze' with a default of 'public', and 'database_name' is 'Database name to analyze' with a default if omitted. This adds meaningful context beyond the bare schema, though it doesn't detail format constraints or validation rules.

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 explicitly states the tool's purpose as 'Analyze size information and index usage of all tables in specified schema' with specific verbs (retrieve, analyze, provide) and resources (tables, schema). It clearly distinguishes from siblings like get_table_list (lists tables) or get_table_io_stats (I/O statistics) by focusing on size and index analysis.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description includes explicit 'Required Use Cases' (e.g., when user requests 'table size', 'schema capacity') and 'Strictly Prohibited Use Cases' (e.g., table data deletion, index creation/deletion). This provides clear guidance on when to use this tool versus alternatives, including what it should not be used for.

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/call518/MCP-PostgreSQL-Ops'

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