Skip to main content
Glama

long_running_queries

Find active PostgreSQL queries older than a configurable threshold, listed oldest first, to diagnose long-running query issues.

Instructions

[READ] Active queries running at least min_seconds, oldest first.

Args:
    min_seconds: Minimum age in seconds (default 60).
    target: Target name from config; omit for the default.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
targetNo
min_secondsNo
Behavior2/5

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

The '[READ]' prefix indicates read-only behavior, but no annotations are provided to confirm. The description does not disclose permissions, rate limits, or return format. For a listing tool, behavioral traits beyond read-only are missing.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise, with a clear structure: a one-line purpose preceded by a '[READ]' tag, followed by an Args section. Every word is useful and front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is simple (no required params, no output schema), so minimal completeness is acceptable. However, it does not describe what fields or data are returned, which could help agents interpret results. Adequate but not fully complete.

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?

Despite 0% schema description coverage, the Description's Args section explains both parameters: min_seconds (minimum age, default 60) and target (target name, optional). This provides essential meaning beyond the schema's type/default fields.

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 clearly states it lists active queries running at least min_seconds, ordered oldest first. It defines the verb (implied list), resource (active queries), and condition. While it doesn't explicitly distinguish from sibling tools like 'top_queries', the purpose is specific enough.

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

Usage Guidelines2/5

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

No guidance on when to use this tool versus alternatives such as 'top_queries' or 'blocking_lock_chain_rca'. The description lacks context for when it is appropriate or when not to use it.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/AIops-tools/Postgres-AIops'

If you have feedback or need assistance with the MCP directory API, please join our Discord server