Skip to main content
Glama
MCP-MySQL-Ops

MCP-MySQL-Ops

by call518

get_active_connections

Lists active MySQL connections and processes, including user, host, database, command, state, and connection time, so you can diagnose connection issues, monitor sessions, and find long-running queries.

Instructions

[Tool Purpose]: Monitor active MySQL connections and processes

[Exact Functionality]:

  • List all active connections with process ID, user, host, database

  • Show current command being executed by each connection

  • Display connection time and state information

  • Filter by user or database name

[Required Use Cases]:

  • When user requests "active connections", "current sessions", "process list"

  • When diagnosing connection issues or monitoring user activity

  • When checking for long-running queries

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_active_connections"
  }
}

Input Schema

NameRequiredDescriptionDefault
db_filterNoFilter connections by database name
user_filterNoFilter connections by username
database_nameNoDatabase name to connect to (uses default if omitted)

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden and does disclose meaningful behavior: it is a monitoring/read operation, it lists the specific fields returned per connection, and it exposes the state and command being executed. It omits operational caveats that matter for a live process list (e.g. privilege requirements or load on a busy server), which keeps it from the top score.

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?

Front-loaded with a one-line purpose and then sectioned into functionality and use cases, so an agent can scan quickly. The bracketed pseudo-headers are a little ceremonial and duplicate some information, but no sentence is wasted content-wise.

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?

Return values need not be explained since an output schema exists, and all three parameters are documented in-schema with the filters echoed in prose. What is missing is a note on privileges or performance impact of polling live connections, the one behavioral fact an agent would still want.

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 100%, so the baseline is 3, but the description reinforces the two filtering parameters ('Filter by user or database name') in a way that ties them to the returned fields. It says nothing about database_name (the connection target), leaving one parameter to the schema alone.

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 a specific verb and resource ('Monitor active MySQL connections and processes') and then enumerates exactly what the output contains: process ID, user, host, database, current command, connection time, and state. An agent can distinguish this from sibling reporting tools like get_connection_info or get_server_status purely from this text.

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 '[Required Use Cases]' block gives concrete trigger phrases ('active connections', 'current sessions', 'process list') plus two diagnostic scenarios, which is well above typical guidance. It stops short of an explicit exclusion or a named alternative for, say, historical connection statistics, so it is not a full 5.

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