Skip to main content
Glama

db_top_queries

Find slowest database queries to identify performance issues. Supports MySQL and PostgreSQL instances using performance schema or pg_stat_statements.

Instructions

Show the slowest / heaviest queries for an instance's DB. MySQL: performance_schema digest summary. Postgres: pg_stat_statements (extension must be enabled). For the shared-RDS noisy-neighbour case. Requires a db_profile; password from your secret store. Read-only query.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
appNoWebsite/app to target when the instance hosts several DBs; matched loosely against stored site labels. Omit for a single DB.
limitNoHow many queries to return (1–100, default 15).
instance_idYesInstance ID, name, or custom-server name.
Behavior3/5

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

No annotations are provided, so the description carries the behavioral burden. It states the tool is read-only and requires the Postgres extension to be enabled, which is good. However, it lacks details on error handling, authentication failures, response format, or performance impact, leaving some gaps.

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 concise with three sentences, each serving a distinct purpose: stating the action, providing DB-specific details, and noting prerequisites and safety. No unnecessary words.

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?

Given the tool's complexity (multiple DB engines, external prerequisites), the description covers key aspects: DB-specific query sources, extension requirement, and use case. It does not define 'slowest/heaviest' metrics or explicitly compare to db_processlist, but is mostly complete.

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 coverage is 100% with all parameters described in the input schema. The description adds no further parameter semantics, so it meets the baseline of 3.

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 shows the slowest/heaviest queries for an instance's DB, with specific details for MySQL and Postgres sources. It distinguishes from siblings like db_processlist by focusing on historical slow queries and mentions the shared-RDS noisy-neighbour use case.

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?

The description specifies when to use (shared-RDS noisy-neighbour case) and prerequisites (db_profile, password). However, it does not explicitly mention alternatives or when not to use, such as comparing with db_processlist.

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/zb-ss/servonaut'

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