Skip to main content
Glama
call518

MCP PostgreSQL Operations

by call518

get_autovacuum_activity

Monitor recent autovacuum and autoanalyze activity patterns, timing intervals, and execution history to troubleshoot scheduling issues and analyze workload distribution.

Instructions

[Tool Purpose]: Monitor recent autovacuum and autoanalyze activity patterns and execution history

[Exact Functionality]:

  • Track recent autovacuum and autoanalyze execution patterns

  • Analyze autovacuum frequency and timing intervals

  • Show tables with most/least autovacuum activity

  • Calculate average time between autovacuum executions

  • Identify tables with irregular autovacuum patterns

[Required Use Cases]:

  • When user requests "autovacuum activity", "autovacuum history", "vacuum patterns", etc.

  • When monitoring autovacuum performance and effectiveness

  • When troubleshooting autovacuum scheduling issues

  • When analyzing autovacuum workload distribution

[Strictly Prohibited Use Cases]:

  • Requests for autovacuum process control or restart

  • Requests for autovacuum configuration modifications

  • Requests for manual vacuum scheduling

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum number of tables to show (1-100, default: 50)
hours_backNoTime period to analyze in hours (default: 24, max: 168 for 7 days)
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. 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 / hours_back / description
      Added value: +"Time period to analyze in hours (default: 24, max: 168 for 7 days)"
    • addedInput schema / properties / limit / description
      Added value: +"Maximum number of tables to show (1-100, default: 50)"
    • addedInput schema / properties / schema_name / description
      Added value: +"Schema to analyze (analyzes all user schemas if omitted)"
  2. Changed11 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 / hours_back / title
      Removed value: -"Hours Back"
    • 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

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. The prohibited-use list does implicitly establish this as an observational, read-only tool that cannot control or reconfigure autovacuum, which is valuable. But it says nothing about data provenance or limits (e.g. dependence on pg_stat_* counters, stats reset behavior, required privileges), which matters for an activity-history tool.

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 bracketed sections make it scannable and front-loaded, which helps. But there is overlap: 'Track recent autovacuum and autoanalyze execution patterns' in Functionality merely restates the purpose line, and several Functionality bullets and Use Case bullets cover the same ground (frequency/timing vs. monitoring performance).

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 values need no explanation, and all parameters are optional and schema-documented. The description covers what it does, when to invoke it, and what it refuses to do. The main omission is sibling disambiguation against the multiple other vacuum-related tools in this server.

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 all four optional parameters (limit, hours_back, schema_name, database_name) are already fully documented in the schema, including ranges and defaults. The description adds no additional meaning about their interaction, such as whether hours_back bounds the interval calculations. Baseline 3 applies when the schema does the heavy lifting.

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 opens with a specific verb and resource: monitoring recent autovacuum and autoanalyze activity patterns and execution history. That is materially clearer than the name alone and separates it from control operations. However, it never distinguishes itself from close siblings such as get_autovacuum_status, get_running_vacuum_operations, or get_vacuum_effectiveness_analysis, so an agent cannot route confidently between them.

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 trigger phrases ('autovacuum activity', 'autovacuum history') plus three concrete scenarios (performance monitoring, scheduling troubleshooting, workload distribution). The prohibited-use section usefully rules out control/config/mutation requests. The gap is that no alternative tool is ever named for the excluded or adjacent cases.

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