Skip to main content
Glama
call518

MCP PostgreSQL Operations

by call518

get_autovacuum_status

Analyze PostgreSQL autovacuum configuration and dead-tuple trigger status to identify tables needing vacuum attention and estimate upcoming autovacuum runs.

Instructions

[Tool Purpose]: Analyze autovacuum configuration and current maintenance status for tables

[Exact Functionality]:

  • Analyze autovacuum trigger conditions based on dead tuple thresholds

  • Calculate current dead tuple ratios vs autovacuum trigger points

  • Show autovacuum configuration settings per table

  • Identify tables requiring immediate autovacuum attention

  • Estimate next autovacuum execution likelihood

[Required Use Cases]:

  • When user requests "autovacuum status", "autovacuum configuration", "vacuum trigger analysis", etc.

  • When planning autovacuum optimization and tuning

  • When troubleshooting autovacuum performance issues

  • When identifying tables with autovacuum problems

[Strictly Prohibited Use Cases]:

  • Requests for autovacuum configuration changes

  • Requests for manual VACUUM execution

  • Requests for autovacuum process restart or control

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum number of tables to analyze (1-100, default: 50)
schema_nameNoSchema to analyze (analyzes all user schemas if omitted)
database_nameNoTarget database name (uses default database from POSTGRES_DB env var if omitted)
table_patternNoTable name pattern to filter (SQL LIKE pattern, e.g., 'user%', '%log%', 'temp_*')

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 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: 50)"
    • addedInput schema / properties / schema_name / description
      Added value: +"Schema to analyze (analyzes all user schemas if omitted)"
    • addedInput schema / properties / table_pattern / description
      Added value: +"Table name pattern to filter (SQL LIKE pattern, e.g., 'user%', '%log%', 'temp_*')"
  2. Changed13 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"
    • addedInput schema / properties / table_pattern / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedInput schema / properties / table_pattern / title
      Removed value: -"Table Pattern"
    • removedInput schema / properties / table_pattern / type
      Removed value: -"string"
    • removedOutput schema / properties / result / title
      Removed value: -"Result"
    • removedOutput schema / title
      Removed value: -"_WrappedResult"
  3. Addedv1.0.0

TDQS

A3.9/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 disclosure burden and does well: it makes clear the tool only reads/analyzes and never mutates, and it specifies what the analysis covers (trigger conditions, current ratios, per-table settings, tables needing attention). It omits operational traits such as cost on large catalogs or any permission requirements, which is why it isn't a 5.

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?

Bracketed headers make it front-loaded and scannable, and the use-case sections are the highest-value content. It is slightly padded — the 'Exact Functionality' bullets overlap with the purpose line and with each other (trigger conditions vs dead tuple ratios vs next execution likelihood).

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?

An output schema exists, so return shape needn't be explained, and all four parameters are schema-documented; use cases and exclusions are thorough. The remaining gap is sibling differentiation inside a 40-tool namespace, where get_autovacuum_activity and get_running_vacuum_operations sit closest to this one.

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 limit, schema_name, database_name, and table_pattern are already fully documented in structured fields. The description adds no filtering syntax hints or defaults beyond the schema ('per table', 'tables requiring attention'), which is the expected baseline for a fully-covered schema.

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?

States a specific verb and resource ('Analyze autovacuum configuration and current maintenance status for tables') and enumerates concrete computations (dead tuple ratios vs trigger points, per-table settings, next-run likelihood). An agent can tell this is a read-only configuration/threshold analysis tool. However, it never names the closely overlapping siblings (get_autovacuum_activity, get_running_vacuum_operations, get_vacuum_analyze_stats, get_vacuum_effectiveness_analysis), so the boundary must be inferred from the prohibited list.

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?

The 'Required Use Cases' section gives explicit trigger phrases and scenarios, and 'Strictly Prohibited Use Cases' cleanly rules out config changes, manual VACUUM, and process control. What it lacks is routing to a specific alternative tool for those excluded needs — it describes the boundaries but does not point the agent at a sibling.

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