Skip to main content
Glama

long_running_queries

Read-only

Find active MySQL or MariaDB statements exceeding a minimum runtime, sorted oldest first, to diagnose slow queries and performance issues.

Instructions

[READ] Active statements running at least min_seconds, oldest first.

Args: min_seconds: Minimum age in seconds (default 60). target: Target name from config; omit for the default.

Input Schema

NameRequiredDescriptionDefault
targetNo
min_secondsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.0

TDQS

A3.5/5.0
Behavior3/5

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

readOnlyHint=true already establishes the safety profile, and the '[READ]' tag merely restates it. The description does add ordering behavior ('oldest first'), the semantics of what counts as a match ('active statements running at least min_seconds'), and target defaulting, but says nothing about result limits, pagination, or output columns.

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?

One-line summary followed by a compact two-parameter block; the scoping detail (min_seconds, ordering) is front-loaded. Slight redundancy in restating the default 60 that also appears in the schema, but nothing wasted.

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?

There is no output schema, so the description ideally should hint at the returned columns (session id, query text, elapsed time) or any result cap. Safety is covered by annotations and both params are covered, but the return shape for a listing tool is unspecified.

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 description coverage is 0%, so the description carries the full burden, and it does document both parameters: min_seconds as minimum age in seconds with a default of 60, and target as a config target name omitted for the default. Only weakness is that 'target name from config' doesn't say which config or what valid values exist.

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?

States a specific verb+resource+scope: active statements running at least min_seconds, returned oldest first. That distinguishes it from aggregated siblings like top_queries or index_stats, but it never names an alternative such as slow_query_rca or list_sessions, so sibling differentiation is left to the agent.

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 is implied by the scope ('active statements', 'minimum age'), so an agent can infer this is for spotting currently running long queries. However, there is no explicit when-to-use or when-not-to-use guidance and no pointer to slow_query_rca or top_queries for the historical/aggregate case.

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