Skip to main content
Glama

reset_query_stats

Destructive

Clear PostgreSQL pg_stat_statements accumulators to refresh query performance baselines; preview the irreversible write with dry_run before applying.

Instructions

[WRITE][risk=medium] Reset pg_stat_statements accumulators (irreversible).

The counters cannot be restored, so no undo is recorded. Pass dry_run=True
to preview.

Args:
    dry_run: If True, preview without resetting.
    target: Target name from config; omit for the default.

Input Schema

NameRequiredDescriptionDefault
targetNo
dry_runNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already flag destructiveHint=true and idempotentHint=false, so the safety profile is covered. The description goes further by explaining that counters cannot be restored and that no undo is recorded, which is meaningful context beyond the structured hints, though it stops short of naming required privileges or side effects on other sessions.

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 risk tag and irreversibility statement are front-loaded, and the Args section is compact. The bracketed [WRITE] tag and prose restating the same caution are slightly redundant, but nothing is wasted at length.

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 no output schema and only two optional parameters, the description covers the destructive nature, the dry-run escape hatch, and the meaning of both params. An agent has enough to invoke it safely, missing only what the call returns and any permission requirements.

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?

Schema description coverage is 0%, so the description carries the burden and does document both parameters: dry_run as a preview toggle and target as a config name with a default fallback. It lacks any format or naming examples for target, but both params are meaningfully explained.

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?

States a specific verb (Reset) and resource (pg_stat_statements accumulators), and the irreversible qualifier narrows the meaning further. It is clearly distinguishable from siblings like cancel_query, terminate_backend, or undo_apply, none of which reset statistics counters.

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

Usage Guidelines3/5

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

The dry_run preview instruction implies a safe practice for using the tool, but the description never states when a user should reset stats versus simply reading them via top_queries or list_activity. No explicit alternatives or when-not conditions are given.

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