Skip to main content
Glama
call518

MCP PostgreSQL Operations

by call518

get_table_io_stats

Analyze table I/O statistics to compare disk reads against buffer cache hits, calculate hit ratios, and identify tables with poor cache performance for PostgreSQL tuning.

Instructions

[Tool Purpose]: Analyze I/O performance statistics for tables (disk reads vs buffer cache hits)

[Exact Functionality]:

  • Show heap, index, and TOAST table I/O statistics

  • Calculate buffer hit ratios for performance analysis

  • Identify tables with poor buffer cache performance

  • Provide detailed I/O breakdown by table component

[Required Use Cases]:

  • When user requests "table I/O stats", "buffer performance", "disk vs cache", etc.

  • When analyzing table-level I/O performance

  • When identifying tables causing excessive disk I/O

  • When optimizing buffer cache efficiency

[Strictly Prohibited Use Cases]:

  • Requests for I/O optimization actions

  • Requests for buffer cache configuration changes

  • Requests for statistics reset

Input Schema

NameRequiredDescriptionDefault
schema_nameNoSchema name to filter (default: public)public
database_nameNoDatabase name to analyze (uses default database if omitted)

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv3.4.3
    • addedInput schema / properties / database_name / description
      Added value: +"Database name to analyze (uses default database if omitted)"
    • addedInput schema / properties / schema_name / description
      Added value: +"Schema name to filter (default: public)"
  2. Changed7 schema fields changedv3.4.2
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / database_name / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedInput schema / properties / database_name / title
      Removed value: -"Database Name"
    • removedInput schema / properties / database_name / type
      Removed value: -"string"
    • removedInput schema / properties / schema_name / title
      Removed value: -"Schema Name"
    • removedOutput schema / properties / result / title
      Removed value: -"Result"
    • removedOutput schema / title
      Removed value: -"_WrappedResult"
  3. Addedv1.0.0

TDQS

A3.6/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full behavioral burden. It implies a read-only analytical operation and explicitly prohibits optimization actions, configuration changes, and resets, but it does not explicitly state read-only behavior, permissions, performance impact, or any rate/scope limits.

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 front-loaded with the purpose and organized into useful sections. It is somewhat over-structured with bracketed headings, but each section adds practical guidance and avoids true redundancy.

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?

With an output schema present and only two optional parameters, the description covers purpose, functionality, and use-case boundaries adequately. It still lacks explicit alternative routing among the many I/O-related sibling tools and explicit read-only behavioral disclosure.

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 parameters are already documented in the schema. The description does not add meaning about schema_name or database_name beyond what the schema provides, so the baseline of 3 is appropriate.

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 table-level I/O performance statistics, including heap, index, and TOAST components. It is clear, but it does not explicitly differentiate itself from close siblings such as get_io_stats or get_index_io_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 gives explicit required use cases and a strict prohibited-use list, so the agent knows when to call it and when not to. It does not name alternative sibling tools for related I/O requests, which keeps it just short of a 5.

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