Skip to main content
Glama

get_top_queries

Identify slow or resource-intensive PostgreSQL queries using pg_stat_statements to optimize database performance.

Instructions

Report slow or resource-intensive queries using pg_stat_statements

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
sort_byNoresources
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It does not mention whether the tool is read-only, safe, or has any side effects. It also fails to mention any prerequisites like requiring pg_stat_statements extension to be enabled.

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 description is a single sentence, which is concise but lacks necessary detail. It could be expanded to cover key behavioral aspects and parameter meanings without being verbose.

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

Completeness2/5

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

Given no output schema and two parameters, the description is insufficient. It does not describe the return format (e.g., a list of query texts with metrics), nor does it mention the source (pg_stat_statements) in a way that signals usage context. For a tool with multiple siblings, this is incomplete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, yet the description adds no information about the parameters (limit, sort_by). The agent does not learn what 'sort_by' values are allowed or how 'limit' affects results, leaving it to guess based on default values.

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 clearly states the tool reports slow or resource-intensive queries using pg_stat_statements. The verb 'report' and resource 'slow/resource-intensive queries' are specific, and it distinguishes from sibling tools like 'explain_query' or 'get_runtime_metrics' which focus on different aspects.

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 is provided on when to use this tool versus alternatives. For example, it does not explain when to prefer it over 'explain_query' for query performance analysis or 'analyze_workload_indexes' for indexing insights.

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/surajmandalcell/pgsql-mcp'

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