Skip to main content
Glama
call518

MCP PostgreSQL Operations

by call518

get_database_size_info

Retrieves disk usage and storage size for all databases on a PostgreSQL server, sorted by size, to help assess capacity and identify databases needing cleanup.

Instructions

[Tool Purpose]: Analyze size information and storage usage status of all databases in PostgreSQL server

[Exact Functionality]:

  • Retrieve disk usage for each database

  • Analyze overall server storage usage status

  • Provide database list sorted by size

[Required Use Cases]:

  • When user requests "database size", "disk usage", "storage space", etc.

  • When capacity management or cleanup is needed

  • When resource usage status by database needs to be identified

[Strictly Prohibited Use Cases]:

  • Requests for data deletion or cleanup operations

  • Requests for storage configuration changes

  • Requests related to backup or restore

Returns: Table-format information with database names and size information sorted by size

Input Schema

NameRequiredDescriptionDefault

No arguments

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv3.4.2
    • addedInput schema / additionalProperties
      Added value: +false
    • removedOutput schema / properties / result / title
      Removed value: -"Result"
    • removedOutput schema / title
      Removed value: -"_WrappedResult"
  2. Addedv1.0.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and discloses that the tool retrieves and analyzes disk usage rather than mutating data, explicitly prohibiting deletion, configuration changes, and backup/restore. It also states the return format as table-format, sorted by size. It does not mention read-only status or permission requirements, but the behavioral boundaries are largely covered.

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?

The description is organized into clear sections and front-loads the purpose. It is appropriately sized, though slightly verbose with repeated mentions of storage usage and sorting.

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 zero parameters, an existing output schema, and no annotations, the description is nearly complete: it covers purpose, usage contexts, prohibited contexts, and return shape. It could better distinguish itself from look-alike siblings such as get_database_stats, but an agent has enough to select it correctly.

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?

The tool has zero parameters, so parameter semantics are not a concern. The description correctly implies no input is needed; baseline for zero parameters is 4.

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?

The description states a specific verb and resource: analyze size and storage usage of all databases in a PostgreSQL server. It distinguishes the scope as server-wide database size rather than table size, but it does not explicitly name or contrast with close siblings such as get_table_size_info or get_database_stats.

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

Usage Guidelines4/5

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

It provides explicit required use cases (database size, disk usage, storage space, capacity management, cleanup needs) and strictly prohibited use cases (deletion, configuration changes, backup/restore). It lacks explicit alternatives, but the when/when-not guidance is clear.

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