Skip to main content
Glama

mysql_active_queries

List non-sleep MySQL threads ordered by duration to spot long-running queries.

Instructions

Non-Sleep threads from information_schema.PROCESSLIST, longest first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral burden. It discloses the data source, the row filter, and the sort order, which accurately conveys what the tool does. It does not explicitly state that it is read-only, but 'from information_schema.PROCESSLIST' strongly implies a non-mutating query.

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?

A single, compact sentence contains the source, filter, and ordering with no wasted words. Key scope information ('Non-Sleep') is front-loaded.

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 zero-parameter, output-schema-backed query tool, this description is nearly complete. It covers source, filtering, and ordering. The only notable gap is an explicit pointer to sibling mysql_processlist for the full/sleep-inclusive view.

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?

There are zero parameters, so the baseline is 4. The description appropriately introduces no parameter details since none exist; the schema already documents this fully.

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 identifies the exact source (information_schema.PROCESSLIST), the filter (Non-Sleep), and ordering (longest first), making it clear this returns active queries rather than all connections. It lacks an explicit verb like 'lists' or 'returns', but the intent is unambiguous and it is distinguishable from the sibling mysql_processlist.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage context is implied: 'Non-Sleep threads' signals this is for active queries rather than all processlist entries. However, the description does not explicitly state when to prefer this over mysql_processlist or name the alternative, so the guidance remains implicit rather than explicit.

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