Skip to main content
Glama
MCP-MySQL-Ops

MCP-MySQL-Ops

by call518

get_lock_monitoring

Monitor current MySQL locks and identify blocked or waiting sessions to diagnose lock contention and deadlock issues.

Instructions

[Tool Purpose]: Monitor current locks in MySQL

[Exact Functionality]:

  • Show current lock information from Performance Schema

  • Display lock types, modes, and status

  • Show which sessions are holding or waiting for locks

  • Include query information for lock holders

[Required Use Cases]:

  • When user requests "lock monitoring", "deadlock check", "blocked sessions"

  • When diagnosing locking issues

  • When checking for lock contention

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_lock_monitoring"
  }
}

Input Schema

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

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

With no annotations present, the description carries the full behavioral burden, and it does so reasonably: "Show" and "Monitor" make the read-only, non-mutating nature clear, and it discloses the data source (Performance Schema) and the scope of what is inspected. It does not mention privilege requirements or the cost of sampling Performance Schema, which would be the last piece for a 5.

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?

Purpose is front-loaded and each bullet in the functionality list adds distinct information rather than restating the header. The bracketed section labels are slightly heavy for a one-parameter tool, but nothing is genuinely wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return values need not be spelled out, yet the description still names the source table family and the lock fields an agent will see. For a single-optional-parameter read tool, an agent has everything needed to decide to call it and to interpret the result.

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?

Only one optional parameter exists and the schema documents it at 100% coverage ("Database name to connect to (uses default if omitted)"), so the schema already does the work and the per-dimension baseline applies. The description adds no parameter-specific meaning, but for a zero-required, single-optional-param tool there is little left to explain.

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 states a specific verb and resource ("Monitor current locks in MySQL") and enumerates exactly what is returned: lock types, modes, status, holding/waiting sessions, and holder query text. That is enough to distinguish it from every sibling in the catalog, none of which deal with locks.

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 ("lock monitoring", "deadlock check", "blocked sessions") plus two diagnostic scenarios, which is well above the norm. It stops short of a 5 because it names no alternative or exclusion — e.g. no pointer to get_slow_queries or get_server_status when the symptom is latency rather than contention.

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