Skip to main content
Glama
call518

MCP PostgreSQL Operations

by call518

get_vacuum_effectiveness_analysis

Analyze PostgreSQL VACUUM effectiveness using existing statistics to identify suboptimal autovacuum or manual VACUUM patterns and plan maintenance tuning without executing operations.

Instructions

[Tool Purpose]: Analyze VACUUM effectiveness and maintenance patterns using existing statistics

[Exact Functionality]:

  • Compare manual VACUUM vs autovacuum effectiveness patterns

  • Analyze VACUUM frequency vs table activity (DML operations)

  • Identify tables with suboptimal VACUUM patterns

  • Calculate maintenance efficiency ratios without performance impact

  • Show VACUUM coverage analysis across all tables

[Required Use Cases]:

  • When user requests "VACUUM effectiveness", "maintenance efficiency", "VACUUM analysis", etc.

  • When planning manual VACUUM schedules or autovacuum tuning

  • When identifying tables with poor maintenance patterns

  • When analyzing overall database maintenance health

[Strictly Prohibited Use Cases]:

  • Requests for VACUUM execution or scheduling

  • Requests for autovacuum configuration changes

  • Requests for maintenance operation control

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum number of tables to analyze (1-100, default: 30)
schema_nameNoSchema to analyze (analyzes all user schemas if omitted)
database_nameNoTarget database name (uses default database from POSTGRES_DB env var if omitted)

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv3.4.3
    • addedInput schema / properties / database_name / description
      Added value: +"Target database name (uses default database from POSTGRES_DB env var if omitted)"
    • addedInput schema / properties / limit / description
      Added value: +"Maximum number of tables to analyze (1-100, default: 30)"
    • addedInput schema / properties / schema_name / description
      Added value: +"Schema to analyze (analyzes all user schemas if omitted)"
  2. Changed10 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 / limit / title
      Removed value: -"Limit"
    • addedInput schema / properties / schema_name / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedInput schema / properties / schema_name / title
      Removed value: -"Schema Name"
    • removedInput schema / properties / schema_name / type
      Removed value: -"string"
    • removedOutput schema / properties / result / title
      Removed value: -"Result"
    • removedOutput schema / title
      Removed value: -"_WrappedResult"
  3. Addedv1.0.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does disclose key behavior: it uses existing statistics, avoids performance impact, and explicitly does not execute or control maintenance operations. It does not state permissions or return format, but the output schema covers returns.

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 and organized into purpose, functionality, required use cases, and prohibited use cases. It is somewhat verbose with bracketed section headers, but every section contributes useful selection guidance.

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 an output schema, fully described parameters, and no annotations, the description provides enough context to select and invoke the tool correctly. It covers purpose, scope, non-execution behavior, and explicit prohibited scenarios.

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 coverage is 100%, so all three parameters are already documented in the schema. The description does not add parameter-specific meaning beyond describing analysis scope, 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.

Purpose5/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 VACUUM effectiveness and maintenance patterns using existing statistics. The functionality bullets clearly distinguish it from raw vacuum-stat tools by focusing on effectiveness comparison, frequency vs DML activity, and maintenance efficiency ratios.

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 strictly prohibited use cases, including VACUUM execution, scheduling, and autovacuum configuration changes. Alternatives are not named, but the when-to-use and when-not-to-use guidance is unusually clear.

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