Skip to main content
Glama
irsyadjpp

postgres-mcp-server

by irsyadjpp

get_slow_queries

Identify and analyze slow PostgreSQL queries using pg_stat_statements. Filter and sort by execution time, calls, or rows to pinpoint performance bottlenecks.

Instructions

Analyze slow queries via pg_stat_statements with filtering and sorting

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
sort_byNo
min_callsNo
database_nameNo
min_duration_msNo
include_query_textNo
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions the use of pg_stat_statements, which hints at read-only analysis, but does not disclose whether there are side effects, permission requirements, return result format, or any other operational behaviors. The description is too brief to convey the tool's runtime characteristics.

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 a single concise sentence that is front-loaded with the main purpose. It contains no fluff or redundant information, making it easy to parse quickly.

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 that there are 6 optional parameters, no output schema, and no annotations, the description is incomplete for a diagnostic tool. It lacks information about the returned data shape, when to prefer this over sibling tools, and any operational caveats. The single sentence is not enough to fully contextualize the tool's usage.

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

Parameters2/5

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

The schema has 6 parameters with 0% coverage in the description. The description only mentions 'filtering and sorting' without explaining which parameters map to these actions or defining their semantics. While the schema itself provides names and types, the description adds minimal value beyond that, leaving the agent to infer the purpose of fields like min_calls or include_query_text.

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 the tool analyzes slow queries via pg_stat_statements, using the specific verb 'analyze' and naming the data source. It also mentions filtering and sorting, which gives a precise scope. However, it does not explicitly differentiate from sibling tools like statements_enhanced or explain_query, though the pg_stat_statements reference adds specificity.

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. The description only states what it does without any context on prerequisites, typical scenarios, or exclusions (e.g., when to use explain_query instead). This leaves the agent without decision criteria.

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/irsyadjpp/postgres-mcp-server'

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