Skip to main content
Glama

db_top_queries

Identify resource-intensive database queries to pinpoint performance bottlenecks. Supports MySQL and PostgreSQL, requires a db_profile, read-only.

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.
Behavior4/5

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

With no annotations provided, the description carries full burden. It explicitly states the tool is read-only and details engine-specific data sources (MySQL: performance_schema, Postgres: pg_stat_statements). It also notes authentication requirements (db_profile, secret store password). No contradictions found.

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: four sentences that front-load the purpose, then cover engine-specifics, use case, and prerequisites. Every sentence adds essential information with no redundancy or fluff.

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 description lacks details about the return format (e.g., what columns/fields the results contain) and does not mention error conditions (e.g., missing extension in Postgres). While it covers the primary use case well, these omissions reduce completeness for an agent needing to interpret results.

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 coverage is 100% with descriptions for all three parameters. The description adds value beyond the schema by explaining the app parameter's matching behavior ('matched loosely against stored site labels') and reinforcing the limit's default range. The engine-specific context also helps interpret parameters.

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 a database instance, mentioning specific engines (MySQL with performance_schema, Postgres with pg_stat_statements). It distinguishes itself from sibling tools like db_processlist by focusing on performance metrics rather than current processes, and even specifies the use case for shared-RDS noisy-neighbour scenarios.

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 provides clear context for when to use the tool: for an instance's DB to identify heavy queries, especially in a noisy-neighbour case. It mentions prerequisites (db_profile, password from secret store) and implies read-only access. It does not explicitly list when not to use it or alternatives, but the context is sufficient to guide an agent.

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