Skip to main content
Glama

FFxF

Most expensive queries

get_slow_queries
Read-only

The 20 queries with the most total time (pg_stat_statements, values replaced by $1, $2…; performance_schema on MySQL and MariaDB, values replaced by ?): calls, total and mean time, rows. A starting point for indexes. On Valkey, the commands with the most total time since the engine started (GET, HSET…). Scope: vms.read.

Input Schema

NameRequiredDescriptionDefault
databaseYesDatabase id, as returned by list_databases or create_database.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already mark it read-only and open-world, and the description adds important behavior: results are capped at 20, query values are normalized ($1/$2 or ?), engine-specific data sources are noted, and vms.read scope is stated. It omits whether PostgreSQL/MySQL results are cumulative since statistics reset and does not fully explain ordering beyond total time.

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

Conciseness4/5

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

The description is efficient and front-loaded with no filler, and every sentence contributes useful information. The first sentence is very dense with parenthetical engine details, which slightly hurts readability but not enough to lower the score further.

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?

For a one-parameter read-only getter, it covers engine variants, returned fields, the 20-row limit, and auth scope. It could be more complete with time-window or statistics-reset semantics, but it provides enough to invoke the tool correctly.

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?

The single required database parameter has full schema coverage with a clear description in the schema itself. The tool description adds no parameter-level meaning beyond what the schema already provides, making the baseline score appropriate.

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?

States exactly what is returned: the 20 queries with the most total time, including engine-specific sources and fields. It is clearly distinguishable from sibling metric tools like get_database_metrics by focusing on query-level top offenders rather than aggregate metrics.

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?

Provides a clear use case with 'A starting point for indexes,' which implies when to call the tool. It does not explicitly say when not to use it or name get_database_metrics as an alternative, so it falls short of a 5.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources